浏览代码

Merge pull request #8773 from villfa/ci/lint

Check syntax of PHP files in src
Jordi Boggiano 5 年之前
父节点
当前提交
125b3136d1
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      .travis.yml

+ 3 - 0
.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,6 +73,7 @@ before_script:
   - git config --global user.email travis@example.com
 
 script:
+  - 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 &&