From 4fa24cd9cb6ed2ad00a0d9f6490205f4203a670b Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Mon, 14 May 2018 12:06:05 +0200 Subject: [PATCH] Update for CI --- .travis.yml | 6 ++++++ Tests/DependencyInjection/Compiler/MessengerPassTest.php | 8 ++++++++ Tests/DependencyInjection/DoctrineExtensionTest.php | 5 +++++ composer.json | 6 ++---- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c9821d88..c7377c8dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,12 @@ jobs: - composer config minimum-stability RC - travis_retry composer update -n --prefer-dist + - php: 7.1 + env: stability=dev SYMFONY_DEPRECATIONS_HELPER=weak SYMFONY_VERSION="~4.1-beta2" + install: + - composer config minimum-stability dev + - travis_retry composer update -n --prefer-dist + - php: 7.2 env: stability=alpha install: diff --git a/Tests/DependencyInjection/Compiler/MessengerPassTest.php b/Tests/DependencyInjection/Compiler/MessengerPassTest.php index a39d3bdec..1b91f3a0e 100644 --- a/Tests/DependencyInjection/Compiler/MessengerPassTest.php +++ b/Tests/DependencyInjection/Compiler/MessengerPassTest.php @@ -8,9 +8,17 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\Messenger\MessageBus; +use Symfony\Component\Messenger\MessageBusInterface; class MessengerPassTest extends TestCase { + protected function setUp() + { + if (!interface_exists(MessageBusInterface::class)) { + $this->markTestSkipped('Symfony Messenger component is not installed'); + } + } + public function testRemovesDefinitionsWhenMessengerComponentIsDisabled() { $pass = new MessengerPass(); diff --git a/Tests/DependencyInjection/DoctrineExtensionTest.php b/Tests/DependencyInjection/DoctrineExtensionTest.php index 3803a8c2c..a3080128f 100644 --- a/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -18,6 +18,7 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Messenger\MessageBusInterface; class DoctrineExtensionTest extends TestCase { @@ -678,6 +679,10 @@ public function testAnnotationsBundleMappingDetectionWithVendorNamespace() public function testMessengerIntegration() { + if (!interface_exists(MessageBusInterface::class)) { + $this->markTestSkipped('Symfony Messenger component is not installed'); + } + $container = $this->getContainer(); $extension = new DoctrineExtension(); diff --git a/composer.json b/composer.json index 0ca83e232..e036fa6a5 100644 --- a/composer.json +++ b/composer.json @@ -42,8 +42,7 @@ "twig/twig": "~1.26|~2.0", "satooshi/php-coveralls": "^1.0", "phpunit/phpunit": "^4.8.36|^5.7|^6.4", - "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0", - "symfony/messenger": "~4.1-beta2" + "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0" }, "conflict": { "symfony/http-foundation": "<2.6" @@ -62,6 +61,5 @@ "branch-alias": { "dev-master": "1.9.x-dev" } - }, - "minimum-stability": "dev" + } }