diff -u b/core/core.services.yml b/core/core.services.yml --- b/core/core.services.yml +++ b/core/core.services.yml @@ -254,6 +254,7 @@ arguments: ['@content_negotiation'] tags: - { name: route_enhancer, priority: 20 } + - { name: legacy_route_enhancer, priority: 20 } route_enhancer.form: class: Drupal\Core\Routing\Enhancer\FormEnhancer arguments: ['@content_negotiation'] only in patch2: unchanged: --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php @@ -28,11 +28,15 @@ public function process(ContainerBuilder $container) { } $router = $container->getDefinition('router.dynamic'); - - $services = array(); foreach ($container->findTaggedServiceIds('route_enhancer') as $id => $attributes) { $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; $router->addMethodCall('addRouteEnhancer', array(new Reference($id), $priority)); } + + $legacy_router = $container->getDefinition('legacy_router'); + foreach ($container->findTaggedServiceIds('legacy_route_enhancer') as $id => $attributes) { + $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; + $legacy_router->addMethodCall('addRouteEnhancer', array(new Reference($id), $priority)); + } } }