From eae10a985cbc20e46bafafce02521fd5aaf886a8 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Sun, 7 Apr 2019 21:34:30 +0200 Subject: [CI] php -l syntax check (#2361) As suggested by @Alkarex in . --- .travis.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index dbd4eb8f6..61b4cc596 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ install: script: - phpenv rehash + - git ls-files -z "*.php" | xargs -0 -n1 -P4 php -l - | if [[ $VALIDATE_STANDARD == yes ]]; then COMPOSER_BIN=$(composer global config --absolute bin-dir) -- cgit v1.2.3 From 1bf8ef4e32dedb81da623fab288c79394d4dc37f Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 8 Apr 2019 22:32:17 +0200 Subject: [CI] Force php -l failure (#2363) * [CI] Force php -l failure By redirecting stderr to a file and checking if the filesize is greater than 0 bytes, we can also force failure for warnings. See discussion in . * exclude JSON lib --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 61b4cc596..078a91109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ install: script: - phpenv rehash - - git ls-files -z "*.php" | xargs -0 -n1 -P4 php -l + - find . -not -path "./lib/JSON.php" -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results + - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi - | if [[ $VALIDATE_STANDARD == yes ]]; then COMPOSER_BIN=$(composer global config --absolute bin-dir) -- cgit v1.2.3