Skip to content

Commit c8c437a

Browse files
committed
Automatically enable the routing annotation loader
1 parent 3f5c610 commit c8c437a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.4.0
5+
-----
6+
7+
* Added support for prioritized routing loaders.
8+
49
3.3.0
510
-----
611

@@ -19,7 +24,7 @@ CHANGELOG
1924

2025
* Added support for `bool`, `int`, `float`, `string`, `list` and `map` defaults in XML configurations.
2126
* Added support for UTF-8 requirements
22-
27+
2328
2.8.0
2429
-----
2530

DependencyInjection/RoutingResolverPass.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\DependencyInjection\Reference;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
17+
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
1718

1819
/**
1920
* Adds tagged routing.loader services to routing.resolver service.
@@ -22,6 +23,8 @@
2223
*/
2324
class RoutingResolverPass implements CompilerPassInterface
2425
{
26+
use PriorityTaggedServiceTrait;
27+
2528
private $resolverServiceId;
2629
private $loaderTag;
2730

@@ -39,7 +42,7 @@ public function process(ContainerBuilder $container)
3942

4043
$definition = $container->getDefinition($this->resolverServiceId);
4144

42-
foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) {
45+
foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) {
4346
$definition->addMethodCall('addLoader', array(new Reference($id)));
4447
}
4548
}

0 commit comments

Comments
 (0)