Skip to content

Commit f66afef

Browse files
committed
Move RoutingResolverPass to the Routing component
1 parent fa4fe3d commit f66afef

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ CHANGELOG
2727
`render()`, `renderView()` and `stream()` methods can only use Twig (using the Templating component is not supported).
2828
The `json()` method requires the Serializer component (use `Symfony\Component\HttpFoundation\JsonResponse` directly if
2929
you do not want to use the Serializer).
30-
* Deprecated `ControllerArgumentValueResolverPass`. Use
30+
* Deprecated `ControllerArgumentValueResolverPass`. Use
3131
`Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass` instead
32+
* Deprecated `RoutingResolverPass`, use `Symfony\Component\Routing\DependencyInjection\RoutingResolverPass` instead
3233

3334
3.2.0
3435
-----

DependencyInjection/Compiler/RoutingResolverPass.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,17 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
1313

14-
use Symfony\Component\DependencyInjection\Reference;
15-
use Symfony\Component\DependencyInjection\ContainerBuilder;
16-
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
14+
use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass as BaseRoutingResolverPass;
15+
16+
@trigger_error(sprintf('The %s class is deprecated since version 3.3 and will be removed in 4.0. Use %s instead.', RoutingResolverPass::class, BaseRoutingResolverPass::class), E_USER_DEPRECATED);
1717

1818
/**
1919
* Adds tagged routing.loader services to routing.resolver service.
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
22+
*
23+
* @deprecated since version 3.3, to be removed in 4.0. Use {@link BaseRoutingResolverPass}
2224
*/
23-
class RoutingResolverPass implements CompilerPassInterface
25+
class RoutingResolverPass extends BaseRoutingResolverPass
2426
{
25-
public function process(ContainerBuilder $container)
26-
{
27-
if (false === $container->hasDefinition('routing.resolver')) {
28-
return;
29-
}
30-
31-
$definition = $container->getDefinition('routing.resolver');
32-
33-
foreach ($container->findTaggedServiceIds('routing.loader') as $id => $attributes) {
34-
$definition->addMethodCall('addLoader', array(new Reference($id)));
35-
}
36-
}
3727
}

FrameworkBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolClearerPass;
2121
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
2222
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass;
23-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RoutingResolverPass;
2423
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
2524
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass;
2625
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
@@ -37,6 +36,7 @@
3736
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
3837
use Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass;
3938
use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass;
39+
use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass;
4040
use Symfony\Component\Serializer\DependencyInjection\SerializerPass;
4141
use Symfony\Component\Debug\ErrorHandler;
4242
use Symfony\Component\DependencyInjection\ContainerBuilder;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"symfony/polyfill-mbstring": "~1.0",
2828
"symfony/filesystem": "~2.8|~3.0",
2929
"symfony/finder": "~2.8|~3.0",
30-
"symfony/routing": "~3.1.10|^3.2.3",
30+
"symfony/routing": "~3.3",
3131
"symfony/security-core": "~2.8|~3.0",
3232
"symfony/security-csrf": "~2.8|~3.0",
3333
"symfony/stopwatch": "~2.8|~3.0",

0 commit comments

Comments
 (0)