summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-07-20 00:25:18 (GMT)
committerAlex Pott2013-07-20 00:25:18 (GMT)
commited556d1923636c9ce4cfc41626dcdd4d9771b397 (patch)
tree9cbf250f0e3b2c5f60e806cbbbaf507f993d84af
parent3bc754a644be6c65db5147e63e9bb003477988b2 (diff)
Issue #1913162 by katbailey: Remove unused 'matcher' compiler pass.
-rw-r--r--core/lib/Drupal/Core/CoreServiceProvider.php2
-rw-r--r--core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterMatchersPass.php35
-rw-r--r--core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php10
3 files changed, 5 insertions, 42 deletions
diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php
index c3b6994..68f5a97 100644
--- a/core/lib/Drupal/Core/CoreServiceProvider.php
+++ b/core/lib/Drupal/Core/CoreServiceProvider.php
@@ -13,7 +13,6 @@ use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\Compiler\ModifyServiceDefinitionsPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterKernelListenersPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass;
-use Drupal\Core\DependencyInjection\Compiler\RegisterMatchersPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterPathProcessorsPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterRouteFiltersPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterRouteEnhancersPass;
@@ -52,7 +51,6 @@ class CoreServiceProvider implements ServiceProviderInterface {
$this->registerTwig($container);
$this->registerModuleHandler($container);
- $container->addCompilerPass(new RegisterMatchersPass());
$container->addCompilerPass(new RegisterRouteFiltersPass());
// Add a compiler pass for registering event subscribers.
$container->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterMatchersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterMatchersPass.php
deleted file mode 100644
index 793394b..0000000
--- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterMatchersPass.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\Core\DependencyInjection\Compiler\RegisterMatchersPass.
- */
-
-namespace Drupal\Core\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-
-/**
- * Adds services tagged 'chained_matcher' to the 'matcher' service.
- */
-class RegisterMatchersPass implements CompilerPassInterface {
-
- /**
- * Adds services tagged 'chained_matcher' to the 'matcher' service.
- *
- * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
- * The container to process.
- */
- public function process(ContainerBuilder $container) {
- if (!$container->hasDefinition('matcher')) {
- return;
- }
- $matcher = $container->getDefinition('matcher');
- foreach ($container->findTaggedServiceIds('chained_matcher') as $id => $attributes) {
- $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
- $matcher->addMethodCall('add', array(new Reference($id), $priority));
- }
- }
-}
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php
index de9d222..da47fca 100644
--- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains Drupal\Core\DependencyInjection\Compiler\RegisterNestedMatchersPass.
+ * Contains Drupal\Core\DependencyInjection\Compiler\RegisterRouteFiltersPass.
*/
namespace Drupal\Core\DependencyInjection\Compiler;
@@ -12,12 +12,12 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/**
- * Adds services tagged 'nested_matcher' to the tagged_matcher service.
+ * Adds services tagged 'router.matcher' to the matcher service.
*/
class RegisterRouteFiltersPass implements CompilerPassInterface {
/**
- * Adds services tagged 'nested_matcher' to the tagged_matcher service.
+ * Adds services tagged 'router.matcher' to the matcher service.
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* The container to process.
@@ -26,9 +26,9 @@ class RegisterRouteFiltersPass implements CompilerPassInterface {
if (!$container->hasDefinition('router.matcher')) {
return;
}
- $nested = $container->getDefinition('router.matcher');
+ $matcher = $container->getDefinition('router.matcher');
foreach ($container->findTaggedServiceIds('route_filter') as $id => $attributes) {
- $nested->addMethodCall('addRouteFilter', array(new Reference($id)));
+ $matcher->addMethodCall('addRouteFilter', array(new Reference($id)));
}
}
}