diff --git a/doc/php_syntax_check.sh b/doc/php_syntax_check.sh index b91074d483..608f7540c0 100755 --- a/doc/php_syntax_check.sh +++ b/doc/php_syntax_check.sh @@ -10,8 +10,12 @@ cd `dirname $0` cd .. # exclude old / not used PEAR Autoloader giving PHP Fatal error: Method PEAR_Autoloader::__call() must take exactly 2 arguments +# exclude composer conditional included autoload_static.php, as it requires PHP 5.6+ -find ${@-.} -name '*.php' ! -path '*vendor/pear-pear.php.net/PEAR/PEAR/Autoloader.php' -exec php -l {} \; 2>&1 | \ +find ${@-.} -name '*.php' \ + -a ! -path '*vendor/pear-pear.php.net/PEAR/PEAR/Autoloader.php' \ + -a ! -path '*vendor/composer/autoload_static.php' \ + -exec php -l {} \; 2>&1 | \ #grep -v 'No syntax errors detected in' | \ - grep '^PHP' | \ - perl -pe 'END { exit $status } $status=1 if /^PHP (Fatal|Parse error)/;' + egrep '^(PHP|Parse error)' | \ + perl -pe 'END { exit $status } $status=1 if /^(PHP Fatal|(PHP )?Parse error)/;'