From 2e008245b24590efefc87d2db9744b63a06d1908 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 14 Apr 2017 10:51:02 +0200 Subject: [PATCH 01/14] Reduced the number of travis builds. --- .travis.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bce1063c..bf089c66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,10 @@ php: - 7.1 - hhvm + env: - global: - - TEST_COMMAND="composer test" - matrix: - - SYMFONY_VERSION=3.2.* - - SYMFONY_VERSION=3.1.* - - SYMFONY_VERSION=2.8.* + - TEST_COMMAND="composer test" + - SYMFONY_VERSION=2.8.* branches: except: @@ -28,6 +25,10 @@ branches: matrix: fast_finish: true include: + - php: 7.1 + env:SYMFONY_VERSION=3.2.* + - php: 7.1 + env:SYMFONY_VERSION=3.1.* - php: 5.5 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.* From a5e90fd2b740b0bc458f32cb9cba021e2a409595 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 14 Apr 2017 10:53:07 +0200 Subject: [PATCH 02/14] Syntax fix --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf089c66..c1efeceb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,9 @@ matrix: fast_finish: true include: - php: 7.1 - env:SYMFONY_VERSION=3.2.* + env: SYMFONY_VERSION=3.2.* - php: 7.1 - env:SYMFONY_VERSION=3.1.* + env: SYMFONY_VERSION=3.1.* - php: 5.5 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.* From a530f76e04dc4b9b9743fc193ca28e3bebf3464c Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 14 Apr 2017 10:54:24 +0200 Subject: [PATCH 03/14] Update .travis.yml --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c1efeceb..6282781a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,10 +13,8 @@ php: - 7.1 - hhvm - env: - - TEST_COMMAND="composer test" - - SYMFONY_VERSION=2.8.* + - TEST_COMMAND="composer test" SYMFONY_VERSION=2.8.* branches: except: @@ -25,12 +23,12 @@ branches: matrix: fast_finish: true include: + - php: 5.5 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.* - php: 7.1 env: SYMFONY_VERSION=3.2.* - php: 7.1 env: SYMFONY_VERSION=3.1.* - - php: 5.5 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.* install: - composer require symfony/symfony:${SYMFONY_VERSION} --no-update From 339b82cd03d0b681b9417b9f65e5fa08303e5b64 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 14 Apr 2017 10:55:09 +0200 Subject: [PATCH 04/14] Be clearer in Travis GUI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6282781a..731ebeaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ php: - hhvm env: - - TEST_COMMAND="composer test" SYMFONY_VERSION=2.8.* + - SYMFONY_VERSION=2.8.* TEST_COMMAND="composer test" branches: except: From 5176010d50357387f8994992eb2f20cf42b6b277 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 18 Apr 2017 21:30:26 +0200 Subject: [PATCH 05/14] updated according to feedback --- .travis.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 731ebeaa..c92e2b88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ php: - hhvm env: - - SYMFONY_VERSION=2.8.* TEST_COMMAND="composer test" + - TEST_COMMAND="composer test" branches: except: @@ -24,14 +24,18 @@ matrix: fast_finish: true include: - php: 5.5 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.8.* + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" - php: 7.1 - env: SYMFONY_VERSION=3.2.* - - php: 7.1 - env: SYMFONY_VERSION=3.1.* + env: DEPENDENCIES=dev + # Test against LTS versions + - php: 7.0 + env: SYMFONY_VERSION=2.8.* + +before_install: + - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; + - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; install: - - composer require symfony/symfony:${SYMFONY_VERSION} --no-update - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction script: From 145e7545e852669bfede46617a3b0b8cd3c981c2 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 18 Apr 2017 22:02:25 +0200 Subject: [PATCH 06/14] Add tests for sf 3.1 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c92e2b88..e682550f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,11 @@ matrix: env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" - php: 7.1 env: DEPENDENCIES=dev - # Test against LTS versions + # Test against LTS version and specific versions - php: 7.0 env: SYMFONY_VERSION=2.8.* + - php: 7.0 + env: SYMFONY_VERSION=3.1.* before_install: - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; From ca2dd68d73cf578094660d98ae89693d564b2052 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 19 Apr 2017 09:58:36 +0200 Subject: [PATCH 07/14] Re lved --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e682550f..c92e2b88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,11 +27,9 @@ matrix: env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" - php: 7.1 env: DEPENDENCIES=dev - # Test against LTS version and specific versions + # Test against LTS versions - php: 7.0 env: SYMFONY_VERSION=2.8.* - - php: 7.0 - env: SYMFONY_VERSION=3.1.* before_install: - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; From 32b6f43c4e9d8b004f96b06649714b6e2a901c7a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 19 Apr 2017 14:24:53 +0200 Subject: [PATCH 08/14] Use the symfony phpunit bridge --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ca66ab54..3373dc99 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "php-http/guzzle6-adapter": "^1.1.1", "php-http/react-adapter": "^0.2.1", "php-http/buzz-adapter": "^0.3", - "symfony/symfony": "^2.8 || ^3.0", + "symfony/phpunit-bridge": "^3.2", "polishsymfonycommunity/symfony-mocker-container": "^1.0", "matthiasnoback/symfony-dependency-injection-test": "^1.0" }, From de5fd635a07c02bede602415f198c88ffc6abb66 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 10:24:09 +0200 Subject: [PATCH 09/14] Added missing deps --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 3373dc99..f9a6a565 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,9 @@ "php-http/react-adapter": "^0.2.1", "php-http/buzz-adapter": "^0.3", "symfony/phpunit-bridge": "^3.2", + "symfony/twig-bundle": "^2.8 || ^3.0", + "symfony/twig-bridge": "^2.8 || ^3.0", + "symfony/web-profiler-bundle": "^2.8 || ^3.0", "polishsymfonycommunity/symfony-mocker-container": "^1.0", "matthiasnoback/symfony-dependency-injection-test": "^1.0" }, From d9b59850615d6534881ea8b9c818ae2dd46d9122 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 10:36:24 +0200 Subject: [PATCH 10/14] Use strings instead of constants --- Discovery/ConfiguredClientsStrategy.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Discovery/ConfiguredClientsStrategy.php b/Discovery/ConfiguredClientsStrategy.php index b5b88ca6..b7d069fc 100644 --- a/Discovery/ConfiguredClientsStrategy.php +++ b/Discovery/ConfiguredClientsStrategy.php @@ -6,10 +6,8 @@ use Http\Client\HttpAsyncClient; use Http\Discovery\HttpClientDiscovery; use Http\Discovery\Strategy\DiscoveryStrategy; -use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\KernelEvents; /** * A strategy that provide clients configured with HTTPlug bundle. With help from this strategy @@ -77,8 +75,8 @@ public function onEvent(Event $e) public static function getSubscribedEvents() { return [ - KernelEvents::REQUEST => ['onEvent', 1024], - ConsoleEvents::COMMAND => ['onEvent', 1024], + 'kernel.request' => ['onEvent', 1024], + 'console.command' => ['onEvent', 1024], ]; } } From d52663f62d63c0642cad493461224bce3629520a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 10:49:43 +0200 Subject: [PATCH 11/14] Added legacy annotation --- Tests/Unit/DependencyInjection/ConfigurationTest.php | 3 +++ Tests/Unit/DependencyInjection/HttplugExtensionTest.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Tests/Unit/DependencyInjection/ConfigurationTest.php b/Tests/Unit/DependencyInjection/ConfigurationTest.php index 050b5eed..a93fe1f0 100644 --- a/Tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/Tests/Unit/DependencyInjection/ConfigurationTest.php @@ -279,6 +279,9 @@ public function testInvalidAuthentication() $this->assertProcessedConfigurationEquals([], [$file]); } + /** + * @group legacy + */ public function testBackwardCompatibility() { $formats = array_map(function ($path) { diff --git a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php index b6910358..6281d159 100644 --- a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php +++ b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php @@ -174,6 +174,9 @@ public function testNoProfilingWhenNotInDebugMode() $this->verifyProfilingDisabled(); } + /** + * @group legacy + */ public function testProfilingWhenToolbarIsSpecificallyOn() { $this->setParameter('kernel.debug', false); @@ -197,6 +200,9 @@ public function testProfilingWhenToolbarIsSpecificallyOn() $this->assertTrue(isset($arguments[3])); } + /** + * @group legacy + */ private function verifyProfilingDisabled() { $def = $this->container->findDefinition('httplug.client'); From 23a64a6108ffa3259e7700be912149e678c25845 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 11:02:40 +0200 Subject: [PATCH 12/14] merge fix --- Tests/Unit/DependencyInjection/HttplugExtensionTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php index 4c37c5f2..cd410623 100644 --- a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php +++ b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php @@ -213,7 +213,10 @@ public function testOverrideProfillingFormatter() $def = $this->container->findDefinition('httplug.collector.formatter'); $this->assertEquals('acme.formatter', (string) $def->getArgument(0)); } - + + /** + * @group legacy + */ private function verifyProfilingDisabled() { $def = $this->container->findDefinition('httplug.client'); From 01fc201575131f98414f4efc11da1863794c7fdb Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 12:14:44 +0200 Subject: [PATCH 13/14] Fix --- Tests/Unit/DependencyInjection/HttplugExtensionTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php index cd410623..887cee6a 100644 --- a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php +++ b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php @@ -138,6 +138,9 @@ public function testClientPlugins() $this->assertContainerBuilderHasServiceDefinitionWithArgument('httplug.client.acme', 0, $pluginReferences); } + /** + * @group legacy + */ public function testNoProfilingWhenToolbarIsDisabled() { $this->load( @@ -214,9 +217,6 @@ public function testOverrideProfillingFormatter() $this->assertEquals('acme.formatter', (string) $def->getArgument(0)); } - /** - * @group legacy - */ private function verifyProfilingDisabled() { $def = $this->container->findDefinition('httplug.client'); From e076a32db64633576b304732b10c9957540da548 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 24 Apr 2017 15:25:40 +0200 Subject: [PATCH 14/14] Require finder --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index f9a6a565..44fd40fd 100644 --- a/composer.json +++ b/composer.json @@ -41,6 +41,7 @@ "symfony/twig-bundle": "^2.8 || ^3.0", "symfony/twig-bridge": "^2.8 || ^3.0", "symfony/web-profiler-bundle": "^2.8 || ^3.0", + "symfony/finder": "^2.7 || ^3.0", "polishsymfonycommunity/symfony-mocker-container": "^1.0", "matthiasnoback/symfony-dependency-injection-test": "^1.0" },