From da24d0a7d9d96ad2a98081ada6db4dc440d85631 Mon Sep 17 00:00:00 2001 From: Fabien Villepinte Date: Tue, 21 Apr 2020 14:56:51 +0200 Subject: [PATCH] Check syntax of PHP files in src --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22c4c9db5..d1230605e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ matrix: include: - php: 5.3 dist: precise + env: + - PHP_LINT=1 - php: 5.4 dist: trusty - php: 5.5 @@ -71,7 +73,7 @@ before_script: - git config --global user.email travis@example.com script: - - ( set -e; for f in $(find src/ -name *.php); do php -l "$f" || exit 1; done ) + - if [[ "$PHP_LINT" == "1" ]]; then find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f; fi - if [[ $PHPSTAN == "1" ]]; then bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --no-update && bin/composer update phpstan/* phpunit/* sebastian/* --with-all-dependencies &&