Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 55d6f4d

Browse files
committed
Ensure all builds pass
This patch does a number of things to ensure all builds will pass on Travis. First, it removes the `composer.lock`, and modifies the tests to run against latest and lowest dependencies only, with the following notes: - When running against lowest, we need to remove zend-router, as composer 1.8 incorrectly flags version 3.0.1 incompatible with zend-mvc v2 releases, and thus installs zend-mvc 3.0.0 always. I will be reporting this to the composer team. - When running against latest, we need to add zend-mvc-plugin-flashmessenger, zend-mvc-i18n, and zend-mvc-console so that tests against all helpers will pass. Through experimentation, I found that running against the lockfile was problematic due to some dependencies only running on PHP 7.1 and up, as well as the various mixes in dependencies when running against different zend-mvc versions. A lowest/latest approach should be sufficient for our needs until we are able to bump to PHP 7.1+ and drop support for zend-mvc v2 releases. Additionally, this patch adds environments for the PHP 7.3 series, to ensure we are compatible.
1 parent 2a50e67 commit 55d6f4d

File tree

4 files changed

+13
-3333
lines changed

4 files changed

+13
-3333
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ vendor/
1212
zf-mkdoc-theme/
1313

1414
clover.xml
15+
composer.lock
1516
coveralls-upload.json
1617
phpunit.xml

.travis.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,49 @@ env:
1111
- COMPOSER_PROCESS_TIMEOUT=600
1212
- COMPOSER_ARGS="--no-interaction"
1313
- COVERAGE_DEPS="php-coveralls/php-coveralls"
14-
- LEGACY_DEPS="phpunit/phpunit"
15-
- LATEST_DEPS="zendframework/zend-mvc-plugin-flashmessenger zendframework/zend-mvc-i18n zendframework/zend-mvc-console"
14+
- LOWEST_DEPS_REMOVE="zendframework/zend-router"
15+
- LATEST_DEPS_REQUIRE="zendframework/zend-mvc-plugin-flashmessenger zendframework/zend-mvc-i18n zendframework/zend-mvc-console"
1616

1717
matrix:
1818
include:
1919
- php: 5.6
2020
env:
2121
- DEPS=lowest
22-
- php: 5.6
23-
env:
24-
- DEPS=locked
2522
- php: 5.6
2623
env:
2724
- DEPS=latest
2825
- php: 7
2926
env:
3027
- DEPS=lowest
31-
- php: 7
32-
env:
33-
- DEPS=locked
34-
- CS_CHECK=true
35-
- TEST_COVERAGE=true
3628
- php: 7
3729
env:
3830
- DEPS=latest
3931
- php: 7.1
4032
env:
4133
- DEPS=lowest
42-
- php: 7.1
43-
env:
44-
- DEPS=locked
4534
- php: 7.1
4635
env:
4736
- DEPS=latest
37+
- CS_CHECK=true
38+
- TEST_COVERAGE=true
4839
- php: 7.2
4940
env:
5041
- DEPS=lowest
5142
- php: 7.2
5243
env:
53-
- DEPS=locked
54-
- php: 7.2
44+
- DEPS=latest
45+
- php: 7.3
5546
env:
5647
- DEPS=latest
5748

5849
before_install:
5950
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
51+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer remove $COMPOSER_ARGS --no-update --dev $LOWEST_DEPS_REMOVE ; fi
52+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require $COMPOSER_ARGS --no-update --dev $LATEST_DEPS_REQUIRE ; fi
6053

6154
install:
62-
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
63-
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
64-
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi
65-
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
66-
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
55+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi
56+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer install ; fi
6757
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
6858
- stty cols 120 && composer show
6959

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"zendframework/zend-i18n": "^2.6",
3434
"zendframework/zend-log": "^2.7",
3535
"zendframework/zend-modulemanager": "^2.7.1",
36-
"zendframework/zend-mvc": "^2.7 || ^3.0",
36+
"zendframework/zend-mvc": "^2.7.14 || ^3.0",
3737
"zendframework/zend-navigation": "^2.5",
3838
"zendframework/zend-paginator": "^2.5",
3939
"zendframework/zend-permissions-acl": "^2.6",
@@ -51,6 +51,7 @@
5151
"zendframework/zend-http": "Zend\\Http component",
5252
"zendframework/zend-i18n": "Zend\\I18n component",
5353
"zendframework/zend-mvc": "Zend\\Mvc component",
54+
"zendframework/zend-mvc-plugin-flashmessenger": "zend-mvc-plugin-flashmessenger component, if you want to use the FlashMessenger view helper with zend-mvc versions 3 and up",
5455
"zendframework/zend-navigation": "Zend\\Navigation component",
5556
"zendframework/zend-paginator": "Zend\\Paginator component",
5657
"zendframework/zend-permissions-acl": "Zend\\Permissions\\Acl component",

0 commit comments

Comments
 (0)