From a93dd761a7108d97d304077aaa62d2dfee488747 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 13:11:43 +0200 Subject: [PATCH 01/19] Add php8.0 to composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 27b624d5..7cb59e79 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "conflict": { "twig/twig": "<1.40 || >=2,<2.9" From 8c883c942e3265303e6920bd1926ad12a02f9d07 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 15:26:42 +0200 Subject: [PATCH 02/19] Remove allow_failures for php nightly --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0066d896..1dadeaf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,6 @@ matrix: env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.4snapshot env: DEPENDENCIES=dev - allow_failures: - - php: nightly before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; From 23025d3fbf6582790281c2c47a8d3867f1dff0c1 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 17:25:56 +0200 Subject: [PATCH 03/19] Add php 7.4.9 as config platform --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 7cb59e79..27e76fd3 100644 --- a/composer.json +++ b/composer.json @@ -48,5 +48,10 @@ "branch-alias": { "dev-master": "3.2-dev" } + }, + "config": { + "platform": { + "php": "7.4.99" + } } } From f3cca7316a8dc7f497c8d862f6d685c6d53fdc7c Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 18:05:44 +0200 Subject: [PATCH 04/19] Add php nightly in matrix for travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1dadeaf3..5ba0de74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,8 @@ matrix: env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.4snapshot env: DEPENDENCIES=dev + - php: nightly + env: DEPENDENCIES='dev' before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; From 9fba03b1ba0e70dc90d683c9ef1bdbd4e3eac042 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 22:39:39 +0200 Subject: [PATCH 05/19] Remove config platform from composer.json, add config platform to travis --- .travis.yml | 1 + composer.json | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ba0de74..8dc2e977 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ matrix: env: DEPENDENCIES=dev - php: nightly env: DEPENDENCIES='dev' + script: ['composer config platform.php 7.4.99'] before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; diff --git a/composer.json b/composer.json index 27e76fd3..7cb59e79 100644 --- a/composer.json +++ b/composer.json @@ -48,10 +48,5 @@ "branch-alias": { "dev-master": "3.2-dev" } - }, - "config": { - "platform": { - "php": "7.4.99" - } } } From 13508ca1251f72590aef3732a83e6550e9707464 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Wed, 15 Jul 2020 22:50:13 +0200 Subject: [PATCH 06/19] Add composer config platform before_install in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8dc2e977..35d2d90c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,10 @@ matrix: env: DEPENDENCIES=dev - php: nightly env: DEPENDENCIES='dev' - script: ['composer config platform.php 7.4.99'] before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; fi install: - composer update $COMPOSER_FLAGS From 07730937ebcde53cb28694d9300e88974ab3db46 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 10:51:59 +0200 Subject: [PATCH 07/19] Update travis for php nightly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 35d2d90c..c0e7efe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; fi + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require symfony/phpunit-bridge:9.3-dev fi install: - composer update $COMPOSER_FLAGS From d5e49ab91189fdc5d02366613f2220d5421da641 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 10:55:36 +0200 Subject: [PATCH 08/19] Fix travis file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c0e7efe6..8742479d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require symfony/phpunit-bridge:9.3-dev fi + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require symfony/phpunit-bridge:9.3-dev; fi; install: - composer update $COMPOSER_FLAGS From 9aef79dfc83c62ee26316046ce02fdf704f6c433 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:03:41 +0200 Subject: [PATCH 09/19] Change PHPUnit in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8742479d..13850476 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require symfony/phpunit-bridge:9.3-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/phpunit:9.3-dev; fi; install: - composer update $COMPOSER_FLAGS From a0cab5e41966a4315956ae4e44fa3bdcdfbc93f4 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:05:44 +0200 Subject: [PATCH 10/19] Update PHPUnit version in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 13850476..91933ee2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/phpunit:9.3-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/phpunit:9.3.x-dev; fi; install: - composer update $COMPOSER_FLAGS From 2f78410b0e238b0af7167b06d4f6b8f812f7a5d3 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:09:43 +0200 Subject: [PATCH 11/19] Added phpunit/php-code-coverage for php nightly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 91933ee2..f747129c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/phpunit:9.3.x-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:9.3.x-dev; fi; install: - composer update $COMPOSER_FLAGS From e0723e1a1aeef08db95deb5900c02241da852620 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:16:16 +0200 Subject: [PATCH 12/19] Add minimum-stabiliti in composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7cb59e79..13fb8f49 100644 --- a/composer.json +++ b/composer.json @@ -48,5 +48,6 @@ "branch-alias": { "dev-master": "3.2-dev" } - } + }, + "minimum-stability": "dev" } From 02bbc7b1bae8bd73344ca9f6d3b185faafc1c698 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:23:05 +0200 Subject: [PATCH 13/19] Fix minimum-stability for php nightly --- .travis.yml | 2 +- composer.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f747129c..5e6ae9a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:9.3.x-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:9.3.x-dev; fi; install: - composer update $COMPOSER_FLAGS diff --git a/composer.json b/composer.json index 13fb8f49..7cb59e79 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,5 @@ "branch-alias": { "dev-master": "3.2-dev" } - }, - "minimum-stability": "dev" + } } From 192b29a4ac49a1c5c40c68534b44671f0dedefaa Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Thu, 16 Jul 2020 11:27:41 +0200 Subject: [PATCH 14/19] Fix phpunit test --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e6ae9a3..bbf16d31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,8 +33,10 @@ before_install: install: - composer update $COMPOSER_FLAGS - - ./vendor/bin/simple-phpunit install + - if [[ $TRAVIS_PHP_VERSION != 'nightly' ]]; then ./vendor/bin/simple-phpunit install; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then ./vendor/bin/phpunit; fi; script: - composer validate --strict --no-check-lock - - php ./vendor/bin/simple-phpunit + - if [[ $TRAVIS_PHP_VERSION != 'nightly' ]]; then php ./vendor/bin/simple-phpunit; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then ./vendor/bin/phpunit; fi; From 08278064ffa94591c0caf96e10d5914a461857b2 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Fri, 31 Jul 2020 08:57:42 +0200 Subject: [PATCH 15/19] Fix errors --- tests/Knp/Menu/Tests/MenuFactoryTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Knp/Menu/Tests/MenuFactoryTest.php b/tests/Knp/Menu/Tests/MenuFactoryTest.php index 6b28c07c..35cecb9d 100644 --- a/tests/Knp/Menu/Tests/MenuFactoryTest.php +++ b/tests/Knp/Menu/Tests/MenuFactoryTest.php @@ -18,7 +18,7 @@ public function testExtensions(): void ->willReturn(['uri' => 'foobar']); $extension1->expects($this->once()) ->method('buildItem') - ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->contains('foobar')); + ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsEqual('foobar')); $factory->addExtension($extension1); @@ -29,7 +29,7 @@ public function testExtensions(): void ->willReturn(['foo' => 'bar']); $extension1->expects($this->once()) ->method('buildItem') - ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->contains('foobar')); + ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsEqual('foobar')); $factory->addExtension($extension2, 10); From 8a3d18ee7d71e4cd993194a01c1cb3ed197b81b7 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Fri, 31 Jul 2020 09:11:15 +0200 Subject: [PATCH 16/19] Update MenuFactoryTest for old PHP version --- tests/Knp/Menu/Tests/MenuFactoryTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/Knp/Menu/Tests/MenuFactoryTest.php b/tests/Knp/Menu/Tests/MenuFactoryTest.php index 35cecb9d..f62089f0 100644 --- a/tests/Knp/Menu/Tests/MenuFactoryTest.php +++ b/tests/Knp/Menu/Tests/MenuFactoryTest.php @@ -18,7 +18,7 @@ public function testExtensions(): void ->willReturn(['uri' => 'foobar']); $extension1->expects($this->once()) ->method('buildItem') - ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsEqual('foobar')); + ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsCustom('foobar')); $factory->addExtension($extension1); @@ -29,7 +29,7 @@ public function testExtensions(): void ->willReturn(['foo' => 'bar']); $extension1->expects($this->once()) ->method('buildItem') - ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsEqual('foobar')); + ->with($this->isInstanceOf('Knp\Menu\ItemInterface'), $this->containsCustom('foobar')); $factory->addExtension($extension2, 10); @@ -54,4 +54,14 @@ public function testCreateItem(): void $this->assertFalse($item->getDisplayChildren()); $this->assertEquals('foo', $item->getLinkAttribute('class')); } + + private function containsCustom($value) { + if(method_exists($this, 'contains')) { + return $this->contains($value); + } + + if(method_exists($this, 'containsEqual')) { + return $this->containsEqual($value); + } + } } From 7b7781abffd5a271995f2683cce46a7e2286d50b Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Fri, 31 Jul 2020 09:16:49 +0200 Subject: [PATCH 17/19] Update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bbf16d31..1c1bf8ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:9.3.x-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer require phpunit/phpunit:^9.3.x-dev; fi; install: - composer update $COMPOSER_FLAGS From 70b4e35bd4d47eefdf93e57cbd6586f5984cc9ad Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Fri, 31 Jul 2020 09:20:26 +0200 Subject: [PATCH 18/19] Update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c1bf8ba..38f3d459 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer require phpunit/phpunit:^9.3.x-dev; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:^9.3; fi; install: - composer update $COMPOSER_FLAGS From 88c5a32e1a8f627155afc97abd24dd8c0db4eb00 Mon Sep 17 00:00:00 2001 From: Norbert Glanc Date: Fri, 31 Jul 2020 09:24:31 +0200 Subject: [PATCH 19/19] Update travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 38f3d459..e9a59b69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: before_install: - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:9.0.x-dev; composer require phpunit/phpunit:^9.3; fi; + - if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer config platform.php 7.4.99; composer config minimum-stability dev; composer remove symfony/phpunit-bridge; composer require phpunit/php-code-coverage:^9.0; composer require phpunit/phpunit:^9.3; fi; install: - composer update $COMPOSER_FLAGS