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

Ensure that the default initializers register last #65

Merged
merged 7 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ nbproject
tmp/

clover.xml
composer.lock
coveralls-upload.json
phpunit.xml
vendor
66 changes: 37 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ branches:
cache:
directories:
- $HOME/.composer/cache
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
- TESTS_ZEND_FORM_ANNOTATION_SUPPORT=true
- TESTS_ZEND_FORM_RECAPTCHA_SUPPORT=true

Expand All @@ -21,32 +23,42 @@ matrix:
include:
- php: 5.5
env:
- EXECUTE_CS_CHECK=true
- DEPS=lowest
- php: 5.5
env:
- EVENT_MANAGER_VERSION="^2.6.2"
- HYDRATOR_VERSION="^1.1"
- SERVICE_MANAGER_VERSION="^2.7.5"
- DEPS=locked
- CS_CHECK=true
- php: 5.5
env:
- DEPS=latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to a lowest/locked/latest strategy, as it makes it far easier both on Travis and locally to switch between supported versions in order to test. (Which was critical for this patch, as I needed to verify behavior between zend-servicemanager major versions.)

- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPS=lowest
- php: 5.6
env:
- EVENT_MANAGER_VERSION="^2.6.2"
- HYDRATOR_VERSION="^1.1"
- SERVICE_MANAGER_VERSION="^2.7.5"
- TEST_COVERAGE=true
- DEPS=locked
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- php: 7
env:
- EVENT_MANAGER_VERSION="^2.6.2"
- HYDRATOR_VERSION="^1.1"
- SERVICE_MANAGER_VERSION="^2.7.5"
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- EVENT_MANAGER_VERSION="^2.6.2"
- HYDRATOR_VERSION="^1.1"
- SERVICE_MANAGER_VERSION="^2.7.5"
- DEPS=latest
allow_failures:
- php: hhvm

Expand All @@ -55,24 +67,20 @@ notifications:
email: false

before_install:
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
- if [[ $EVENT_MANAGER_VERSION != '' ]]; then composer require --dev --no-update "zendframework/zend-eventmanager:$EVENT_MANAGER_VERSION" ; fi
- if [[ $EVENT_MANAGER_VERSION == '' ]]; then composer require --dev --no-update "zendframework/zend-eventmanager:^3.0" ; fi
- if [[ $HYDRATOR_VERSION != '' ]]; then composer require --no-update "zendframework/zend-stdlib:^2.7" ; fi
- if [[ $HYDRATOR_VERSION != '' ]]; then composer require --no-update "zendframework/zend-hydrator:$HYDRATOR_VERSION" ; fi
- if [[ $SERVICE_MANAGER_VERSION != '' ]]; then composer require --dev --no-update "zendframework/zend-servicemanager:$SERVICE_MANAGER_VERSION" ; fi
- if [[ $SERVICE_MANAGER_VERSION = '' ]]; then composer require --dev --no-update "zendframework/zend-servicemanager:^3.0.3" ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install --no-interaction --ignore-platform-reqs
- composer info -i
- 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 satooshi/php-coveralls:^1.0 ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show --installed

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"zendframework/zend-view": "^2.6.2",
"zendframework/zendservice-recaptcha": "*",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/PHPUnit": "~4.0"
"phpunit/phpunit": "^4.8"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary as otherwise the "lowest" strategy failed due to usage of Prophecy in test cases.

},
"suggest": {
"zendframework/zend-captcha": "Zend\\Captcha component",
Expand Down Expand Up @@ -63,5 +63,16 @@
"psr-4": {
"ZendTest\\Form\\": "test/"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "php-cs-fixer --version && php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover clover.xml"
}
}
Loading