From 0cc0dd31b3883d824b327eb7df716dcd11fa3d2a Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 22 Jun 2017 14:47:06 +0200 Subject: [PATCH 1/4] Adapt .travis.yml to recent ZF standards --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35a3db2c..f2cf3a90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,12 @@ language: php branches: except: - - /^release-\d+\.\d+\.\d+.*$/ + - /^release-.*$/ - /^ghgfk-.*$/ cache: directories: - - $HOME/.composer/cache - - vendor + - $HOME/.composer/ - $HOME/.local - zf-mkdoc-theme @@ -80,13 +79,12 @@ 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 [[ $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 [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi - composer show script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi - - if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi - if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi From 7038329029b2946c171ea735bd64afd1ea596de6 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 22 Jun 2017 14:47:40 +0200 Subject: [PATCH 2/4] Travis: drop HVVM & Add PHP 7.2 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2cf3a90..1a03e922 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,17 +59,17 @@ matrix: - php: 7.1 env: - DEPS=latest - - php: hhvm + - php: nightly env: - DEPS=lowest - - php: hhvm + - php: nightly env: - DEPS=locked - - php: hhvm + - php: nightly env: - DEPS=latest allow_failures: - - php: hhvm + - php: nightly before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi From fbda16c3e87725ac64418e8578d167320855f20b Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 22 Jun 2017 14:57:02 +0200 Subject: [PATCH 3/4] Prepare to PHP 7.2 --- src/Form.php | 2 +- test/View/Helper/FormSelectTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Form.php b/src/Form.php index c9c1a43f..937d9265 100644 --- a/src/Form.php +++ b/src/Form.php @@ -328,7 +328,7 @@ public function setHydrator(HydratorInterface $hydrator) * @param array $values * @return mixed */ - public function bindValues(array $values = []) + public function bindValues(array $values = [], array $validationGroup = null) { if (! is_object($this->object)) { if ($this->baseFieldset === null || $this->baseFieldset->allowValueBinding() == false) { diff --git a/test/View/Helper/FormSelectTest.php b/test/View/Helper/FormSelectTest.php index 5988ef78..3db96928 100644 --- a/test/View/Helper/FormSelectTest.php +++ b/test/View/Helper/FormSelectTest.php @@ -216,7 +216,8 @@ public function testScalarOptionValues($options) $element = new SelectElement('foo'); $element->setValueOptions($options); $markup = $this->helper->render($element); - list($value, $label) = each($options); + $value = key($options); + $label = current($options); $this->assertRegexp(sprintf('#option .*?value="%s"#', (string) $value), $markup); } From 38c0550a5155d29937b26de4fedd2f52630c3676 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Thu, 24 Aug 2017 11:37:28 +0200 Subject: [PATCH 4/4] Travis matrix: nightly -> 7.2 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a03e922..364e331f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,17 +59,17 @@ matrix: - php: 7.1 env: - DEPS=latest - - php: nightly + - php: 7.2 env: - DEPS=lowest - - php: nightly + - php: 7.2 env: - DEPS=locked - - php: nightly + - php: 7.2 env: - DEPS=latest allow_failures: - - php: nightly + - php: 7.2 before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi