exclude composer conditional included autoload_static.php, as it requires PHP 5.6+

This commit is contained in:
Ralf Becker 2016-05-30 21:07:38 +02:00
parent 0e212815bf
commit 111838edc1

View File

@ -10,8 +10,12 @@ cd `dirname $0`
cd .. cd ..
# exclude old / not used PEAR Autoloader giving PHP Fatal error: Method PEAR_Autoloader::__call() must take exactly 2 arguments # 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 -v 'No syntax errors detected in' | \
grep '^PHP' | \ egrep '^(PHP|Parse error)' | \
perl -pe 'END { exit $status } $status=1 if /^PHP (Fatal|Parse error)/;' perl -pe 'END { exit $status } $status=1 if /^(PHP Fatal|(PHP )?Parse error)/;'