From 254209cea6b1cec8717fc880f4ca50890b40f248 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 6 Dec 2018 20:37:54 +0000 Subject: [PATCH 1/4] Updated Travis CI configuration to pass all builds --- .travis.yml | 20 ++++++++++++++++---- composer.json | 2 +- composer.lock | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0014a21..034d8ca6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - COMPOSER_PROCESS_TIMEOUT=600 - COMPOSER_ARGS="--no-interaction" - COVERAGE_DEPS="php-coveralls/php-coveralls" - - LEGACY_DEPS="phpunit/phpunit" + - LOWEST_REMOVE_DEV_DEPS="zendframework/zend-router" - LATEST_DEPS="zendframework/zend-mvc-plugin-flashmessenger zendframework/zend-mvc-i18n zendframework/zend-mvc-console" matrix: @@ -22,6 +22,7 @@ matrix: - php: 5.6 env: - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" - php: 5.6 env: - DEPS=latest @@ -31,8 +32,7 @@ matrix: - php: 7 env: - DEPS=locked - - CS_CHECK=true - - TEST_COVERAGE=true + - LEGACY_DEPS="phpunit/phpunit" - php: 7 env: - DEPS=latest @@ -42,6 +42,8 @@ matrix: - php: 7.1 env: - DEPS=locked + - CS_CHECK=true + - TEST_COVERAGE=true - php: 7.1 env: - DEPS=latest @@ -54,13 +56,23 @@ matrix: - php: 7.2 env: - DEPS=latest + - php: 7.3 + env: + - DEPS=lowest + - php: 7.3 + env: + - DEPS=locked + - php: 7.3 + env: + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi install: - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs - - if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer remove --dev $COMPOSER_ARGS $LOWEST_REMOVE_DEV_DEPS ; fi - if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi diff --git a/composer.json b/composer.json index 3ba95ee9..0e596731 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "zendframework/zend-i18n": "^2.6", "zendframework/zend-log": "^2.7", "zendframework/zend-modulemanager": "^2.7.1", - "zendframework/zend-mvc": "^2.7 || ^3.0", + "zendframework/zend-mvc": "^2.7.14 || ^3.0", "zendframework/zend-navigation": "^2.5", "zendframework/zend-paginator": "^2.5", "zendframework/zend-permissions-acl": "^2.6", diff --git a/composer.lock b/composer.lock index 48961efa..f0300f78 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "605bbf1d6f2bd0d21732b12540172187", + "content-hash": "31cf993be575762c0aba6299a6e57274", "packages": [ { "name": "zendframework/zend-eventmanager", From ae65de9a966f208c1406fba7452896ae66397b76 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 6 Dec 2018 20:43:06 +0000 Subject: [PATCH 2/4] Fixed test to work with Zend\Mvc\Router when zend-router v3 is removed --- test/Helper/UrlTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Helper/UrlTest.php b/test/Helper/UrlTest.php index 9865f9f6..6a62bac4 100644 --- a/test/Helper/UrlTest.php +++ b/test/Helper/UrlTest.php @@ -73,11 +73,11 @@ protected function setUp() ? WildcardRoute::class : NextGenWildcardRoute::class; - $routerClass = class_exists(Router::class) + $this->routerClass = class_exists(Router::class) ? Router::class : NextGenRouter::class; - $router = new $routerClass(); + $router = new $this->routerClass(); $router->addRoute('home', [ 'type' => $this->literalRouteType, 'options' => [ @@ -243,7 +243,7 @@ public function testRemovesModuleRouteListenerParamsWhenReusingMatchedParameters public function testAcceptsNextGenRouterToSetRouter() { - $router = new NextGenRouter(); + $router = new $this->routerClass(); $url = new UrlHelper(); $url->setRouter($router); $this->assertAttributeSame($router, 'router', $url); @@ -251,7 +251,7 @@ public function testAcceptsNextGenRouterToSetRouter() public function testAcceptsNextGenRouteMatche() { - $routeMatch = new NextGenRouteMatch([]); + $routeMatch = new $this->routeMatchType([]); $url = new UrlHelper(); $url->setRouteMatch($routeMatch); $this->assertAttributeSame($routeMatch, 'routeMatch', $url); From b9a9eba3c4cf954e0f4552a870c3baba1b46b072 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 6 Dec 2018 20:47:18 +0000 Subject: [PATCH 3/4] Install plugins for locked and latest deps --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 034d8ca6..bc5ffbc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ install: - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs - if [[ LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer remove --dev $COMPOSER_ARGS $LOWEST_REMOVE_DEV_DEPS ; fi - - if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi + - if [[ $DEPS != 'lowest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi From 9d144f5792256d1a1190f26499e2ba77056b5291 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 6 Dec 2018 20:52:19 +0000 Subject: [PATCH 4/4] Remove no-update flag on requiring plugins --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bc5ffbc5..23bbcb8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ install: - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs - if [[ LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer remove --dev $COMPOSER_ARGS $LOWEST_REMOVE_DEV_DEPS ; fi - - if [[ $DEPS != 'lowest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi + - if [[ $DEPS != 'lowest' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $LATEST_DEPS ; fi - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi