diff --git a/.travis.yml b/.travis.yml index 007011f1b..68c29d067 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: - rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; - echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - composer require symfony/symfony:${SYMFONY_VERSION} --no-update - - composer update + - composer install --ignore-platform-reqs # ext-amqp is not installed - if [ "$FUNCTIONAL_TESTS" = true ]; then docker --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then docker-compose --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi diff --git a/pkg/amqp-ext/.travis.yml b/pkg/amqp-ext/.travis.yml index 42374ddc7..ad53bf6b4 100644 --- a/pkg/amqp-ext/.travis.yml +++ b/pkg/amqp-ext/.travis.yml @@ -15,7 +15,7 @@ cache: install: - composer self-update - - composer install --prefer-source + - composer install --prefer-source --ignore-platform-reqs # ext-amqp is not installed script: - vendor/bin/phpunit --exclude-group=functional diff --git a/pkg/enqueue-bundle/DependencyInjection/Compiler/BuildExtensionsPass.php b/pkg/enqueue-bundle/DependencyInjection/Compiler/BuildExtensionsPass.php index c86b5a35d..31dcee799 100644 --- a/pkg/enqueue-bundle/DependencyInjection/Compiler/BuildExtensionsPass.php +++ b/pkg/enqueue-bundle/DependencyInjection/Compiler/BuildExtensionsPass.php @@ -24,7 +24,7 @@ public function process(ContainerBuilder $container) } } - ksort($groupByPriority); + krsort($groupByPriority, SORT_NUMERIC); $flatExtensions = []; foreach ($groupByPriority as $extension) { diff --git a/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/BuildExtensionsPassTest.php b/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/BuildExtensionsPassTest.php index 8e4aa54bc..0d57167dd 100644 --- a/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/BuildExtensionsPassTest.php +++ b/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/BuildExtensionsPassTest.php @@ -73,9 +73,9 @@ public function testShouldOrderExtensionsByPriority() $orderedExtensions = $extensions->getArgument(0); - $this->assertEquals(new Reference('bar_extension'), $orderedExtensions[0]); + $this->assertEquals(new Reference('foo_extension'), $orderedExtensions[0]); $this->assertEquals(new Reference('baz_extension'), $orderedExtensions[1]); - $this->assertEquals(new Reference('foo_extension'), $orderedExtensions[2]); + $this->assertEquals(new Reference('bar_extension'), $orderedExtensions[2]); } public function testShouldAssumePriorityZeroIfPriorityIsNotSet() @@ -103,8 +103,8 @@ public function testShouldAssumePriorityZeroIfPriorityIsNotSet() $orderedExtensions = $extensions->getArgument(0); - $this->assertEquals(new Reference('baz_extension'), $orderedExtensions[0]); + $this->assertEquals(new Reference('bar_extension'), $orderedExtensions[0]); $this->assertEquals(new Reference('foo_extension'), $orderedExtensions[1]); - $this->assertEquals(new Reference('bar_extension'), $orderedExtensions[2]); + $this->assertEquals(new Reference('baz_extension'), $orderedExtensions[2]); } }