diff --git a/.travis.yml b/.travis.yml index bce1063c..c92e2b88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,12 +14,7 @@ php: - hhvm env: - global: - - TEST_COMMAND="composer test" - matrix: - - SYMFONY_VERSION=3.2.* - - SYMFONY_VERSION=3.1.* - - SYMFONY_VERSION=2.8.* + - TEST_COMMAND="composer test" branches: except: @@ -29,10 +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: 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: diff --git a/Discovery/ConfiguredClientsStrategy.php b/Discovery/ConfiguredClientsStrategy.php index f7a694d2..319c4314 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], ]; } } 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 e8b49aa5..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( @@ -174,6 +177,9 @@ public function testNoProfilingWhenNotInDebugMode() $this->verifyProfilingDisabled(); } + /** + * @group legacy + */ public function testProfilingWhenToolbarIsSpecificallyOn() { $this->setParameter('kernel.debug', false); diff --git a/composer.json b/composer.json index ca66ab54..44fd40fd 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,11 @@ "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", + "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" },