From 19c3e71bf430484b25fd3e1b79ddec644127772d Mon Sep 17 00:00:00 2001 From: Jay Klehr Date: Tue, 19 Feb 2019 13:15:13 -0700 Subject: [PATCH] bumping travis php versions, composer deps, php-cs fix (#2) * bumping travis php versions, composer deps, php-cs fix * php-cs-fixer fix that was cached --- .travis.yml | 37 +++++++++++++------ composer.json | 8 ++-- grumphp.yml.dist | 1 - phpstan.neon | 3 ++ .../Action/Helper/AjaxContextTest.php | 8 ++-- 5 files changed, 37 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8f7c4a..ed532c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,9 @@ language: php sudo: false -php: - - 7 - - 7.1 - - 7.2 - - nightly - -env: TMPDIR=/tmp USE_XDEBUG=false +env: + global: + - COMPOSER_ARGS="" TMPDIR=/tmp USE_XDEBUG=false branches: only: @@ -16,7 +12,7 @@ branches: install: - phpenv rehash - - travis_retry composer install --no-interaction --prefer-source + - travis_retry composer update --no-interaction --prefer-source $COMPOSER_ARGS stages: - test @@ -33,20 +29,39 @@ script: jobs: fast_finish: true allow_failures: + - php: 7.4snapshot - php: nightly include: + - php: 7.1 + env: COMPOSER_ARGS="--prefer-lowest" + - php: 7.1 + - php: 7.2 + env: COMPOSER_ARGS="--prefer-lowest" + - php: 7.2 + - php: 7.3 + env: COMPOSER_ARGS="--prefer-lowest" + - php: 7.3 + - php: 7.4snapshot + env: COMPOSER_ARGS="--ignore-platform-reqs --prefer-lowest" + - php: 7.4snapshot + env: COMPOSER_ARGS="--ignore-platform-reqs" + - php: nightly + env: COMPOSER_ARGS="--ignore-platform-reqs --prefer-lowest" + - php: nightly + env: COMPOSER_ARGS="--ignore-platform-reqs" + - stage: style check - php: 7.1 + php: 7.2 env: TMPDIR=/tmp USE_XDEBUG=false script: - composer style-check - stage: phpstan analysis - php: 7.1 + php: 7.2 env: TMPDIR=/tmp USE_XDEBUG=false script: - composer phpstan - stage: test with coverage - php: 7.1 + php: 7.2 env: TMPDIR=/tmp USE_XDEBUG=true CC_TEST_REPORTER_ID=b24f5b3eb6d201fa7ac40baa04ebad7a43d763ac65bceb87e8e320b30eb0f73b before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter diff --git a/composer.json b/composer.json index 30a7766..f692f3a 100644 --- a/composer.json +++ b/composer.json @@ -25,10 +25,10 @@ } }, "require-dev": { - "phpunit/phpunit": "^6.0", - "phpstan/phpstan": "^0.9.2", + "phpunit/phpunit": "^7.0", + "phpstan/phpstan": "^0.11.2", "friendsofphp/php-cs-fixer": "^2.11", - "maglnet/composer-require-checker": "^0.1.6 | ^0.2.1", + "maglnet/composer-require-checker": "^1.1.0", "phpro/grumphp": "^0.14.0" }, "include-path": [ @@ -40,7 +40,7 @@ "scripts": { "test": "phpunit", "test-with-coverage": "phpunit --coverage-clover=clover.xml", - "phpstan": "phpstan analyze -l7 -c phpstan.neon --no-progress ./ --ansi", + "phpstan": "phpstan analyze -c phpstan.neon --no-progress --ansi", "style-check": "php-cs-fixer fix --dry-run -vv" } } diff --git a/grumphp.yml.dist b/grumphp.yml.dist index 334b6d1..2d76c77 100644 --- a/grumphp.yml.dist +++ b/grumphp.yml.dist @@ -8,7 +8,6 @@ parameters: allow_risky: true config: .php_cs phpstan: - level: 7 configuration: phpstan.neon phpunit: metadata: diff --git a/phpstan.neon b/phpstan.neon index b6fdbc6..b3efcdc 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,7 @@ parameters: + level: 7 + paths: + - ./ excludes_analyse: - %rootDir%/../../../vendor/* - %rootDir%/../../../tests/* diff --git a/tests/Zend/Controller/Action/Helper/AjaxContextTest.php b/tests/Zend/Controller/Action/Helper/AjaxContextTest.php index 26bf774..be24332 100644 --- a/tests/Zend/Controller/Action/Helper/AjaxContextTest.php +++ b/tests/Zend/Controller/Action/Helper/AjaxContextTest.php @@ -191,10 +191,10 @@ public function testAjaxContextIsRequestDependent() $helper = new Zend_Controller_Action_Helper_AjaxContext(); $helper->setActionController( - new Zend_Controller_Action_Helper_AjaxContextTestController( - $request, - $this->response, - array() + new Zend_Controller_Action_Helper_AjaxContextTestController( + $request, + $this->response, + array() ) );