From 0825302a54481e535a7a6becac6caffd58c9495f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 3 Jun 2020 13:12:19 +0200 Subject: [PATCH] suppress everything (not just PHP Deprecated) from vendor, as its up to the vendor to fix --- doc/php_syntax_check.sh | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/doc/php_syntax_check.sh b/doc/php_syntax_check.sh index 5f7edcd4f2..fe28d7d67d 100755 --- a/doc/php_syntax_check.sh +++ b/doc/php_syntax_check.sh @@ -11,30 +11,11 @@ ### Use PHP environment variable to point to a certain PHP binary. ################################################################################ -cd ${1:-$(dirname $0)/..} - -find ${@-.} -name '*.php' -exec ${PHP:-php} -l {} \; 2>&1 | \ +find ${@-$(dirname $0)} -name '*.php' -exec ${PHP:-php} -l {} \; 2>&1 | \ # only show errors and PHP Deprecated, no success messages egrep '^(PHP|Parse error)' | \ - # suppress PHP Deprecated in vendor, as they need to be solved by the vendor - egrep -v '^PHP Deprecated.*/vendor/' | \ + # suppress everything in vendor, as they need to be solved by the vendor + egrep -v 'vendor/' | \ # output everything to stderr tee /dev/fd/2 | \ - # exclude several known problems, to be able to find new ones - # exclude old / not used PEAR Autoloader giving PHP Fatal error: Method PEAR_Autoloader::__call() must take exactly 2 arguments - grep -v 'vendor/pear-pear.php.net/PEAR/PEAR/Autoloader.php' | \ - # exclude PEAR tests giving PHP Parse error: syntax error, unexpected 'new' (T_NEW) - grep -v 'vendor/pear/pear/tests/' | \ - # exclude composer conditional included autoload_static.php, as it requires PHP 5.6+ - grep -v 'vendor/composer/autoload_static.php' | \ - # exclude vendor/phpunit it shows many PHP Parse errors in PHP < 7.4 - grep -v 'vendor/phpunit' | \ - # suppress PHP Parse errors in PHP < 7.0 in dependency of phpunit: phpspec/prophecy - grep -v 'vendor/phpspec/prophecy' | \ - # phpFreeChat does not work with PHP7 - grep -v 'phpfreechat/phpfreechat/' | \ - # vendor/myclabs gives errors in PHP < 7.4 - grep -v 'vendor/myclabs/' | \ - # not used part of ADOdb give PHP Fatal error: Cannot unset $this - grep -v 'adodb-xmlschema' | \ perl -pe 'END { exit $status } $status=1 if /^(PHP Fatal|(PHP )?Parse error)/;' > /dev/null