The scap tool is used to copy PHP files on Apaches and pass them through the lint script to verify the PHP syntax. The script is simple enough and rely on the parsekit PECL extension:
#!/bin/bash
php -n -dextension=parsekit.so dirname $0/lint.php "$@"
exit $?
The parse kit PHP5 extension is not available in lucid:
hashar@deployment-dbdump:~$ scap
Checking syntax...
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/parsekit.so' - /usr/lib/php5/20090626/parsekit.so: cannot open shared object file: No such file or directory in Unknown on line 0
Fatal error: Call to undefined function parsekit_compile_file() in /usr/local/bin/lint.php on line 48
Found syntax errors, cannot sync.
We thus need to craft our own package off pecl, the dh-make-pecl debian helper script sounds like it is an easy task. http://www.mabishu.com/blog/2011/03/20/how-to-easily-create-debian-packages-for-php-extensions/
Once build, we can mark in puppet that lint require the php5-parsekit package.
Please note other systems could use the parsekit extension, continuous integration server comes to mind.
Version: unspecified
Severity: enhancement