Commit c2fb90f9 authored by webchick's avatar webchick

Issue #1872640 by fabpot: Renamed the dispatcher service to event_dispatcher().

parent 27545d65
......@@ -324,12 +324,12 @@ function install_begin_request(&$install_state) {
// @todo Move into a proper Drupal\Core\DependencyInjection\InstallContainerBuilder.
$container = new ContainerBuilder();
$container->register('dispatcher', 'Symfony\Component\EventDispatcher\EventDispatcher');
$container->register('event_dispatcher', 'Symfony\Component\EventDispatcher\EventDispatcher');
$container->register('config.storage', 'Drupal\Core\Config\InstallStorage');
$container->register('config.factory', 'Drupal\Core\Config\ConfigFactory')
->addArgument(new Reference('config.storage'))
->addArgument(new Reference('dispatcher'));
->addArgument(new Reference('event_dispatcher'));
drupal_container($container);
}
......
......@@ -85,7 +85,7 @@ class Config {
public function __construct($name, StorageInterface $storage, EventDispatcher $event_dispatcher = NULL) {
$this->name = $name;
$this->storage = $storage;
$this->eventDispatcher = $event_dispatcher ? $event_dispatcher : drupal_container()->get('dispatcher');
$this->eventDispatcher = $event_dispatcher ? $event_dispatcher : drupal_container()->get('event_dispatcher');
}
/**
......
......@@ -49,13 +49,9 @@ public function build(ContainerBuilder $container) {
->addArgument(new Reference('config.cachedstorage.storage'))
->addArgument(new Reference('cache.config'));
// Register configuration object factory.
$container->register('config.subscriber.globalconf', 'Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber');
$container->register('dispatcher', 'Symfony\Component\EventDispatcher\EventDispatcher')
->addMethodCall('addSubscriber', array(new Reference('config.subscriber.globalconf')));
$container->register('config.factory', 'Drupal\Core\Config\ConfigFactory')
->addArgument(new Reference('config.storage'))
->addArgument(new Reference('dispatcher'))
->addArgument(new Reference('event_dispatcher'))
->addTag('persist');
// Register staging configuration storage.
......@@ -100,12 +96,12 @@ public function build(ContainerBuilder $container) {
$container->register('request', 'Symfony\Component\HttpFoundation\Request')
->setSynthetic(TRUE);
$container->register('dispatcher', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher')
$container->register('event_dispatcher', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher')
->addArgument(new Reference('service_container'));
$container->register('resolver', 'Drupal\Core\ControllerResolver')
->addArgument(new Reference('service_container'));
$container->register('http_kernel', 'Drupal\Core\HttpKernel')
->addArgument(new Reference('dispatcher'))
->addArgument(new Reference('event_dispatcher'))
->addArgument(new Reference('service_container'))
->addArgument(new Reference('resolver'));
$container->register('language_manager', 'Drupal\Core\Language\LanguageManager')
......@@ -134,7 +130,7 @@ public function build(ContainerBuilder $container) {
$container->register('router.builder', 'Drupal\Core\Routing\RouteBuilder')
->addArgument(new Reference('router.dumper'))
->addArgument(new Reference('lock'))
->addArgument(new Reference('dispatcher'));
->addArgument(new Reference('event_dispatcher'));
$container->register('matcher', 'Drupal\Core\Routing\ChainMatcher');
......
......@@ -14,11 +14,11 @@
class RegisterKernelListenersPass implements CompilerPassInterface {
public function process(ContainerBuilder $container) {
if (!$container->hasDefinition('dispatcher')) {
if (!$container->hasDefinition('event_dispatcher')) {
return;
}
$definition = $container->getDefinition('dispatcher');
$definition = $container->getDefinition('event_dispatcher');
foreach ($container->findTaggedServiceIds('event_subscriber') as $id => $attributes) {
......
......@@ -1307,5 +1307,5 @@ function _locale_rebuild_js($langcode = NULL) {
*/
function locale_language_init() {
// Add locale helper to configuration subscribers.
drupal_container()->get('dispatcher')->addSubscriber(new LocaleConfigSubscriber());
drupal_container()->get('event_dispatcher')->addSubscriber(new LocaleConfigSubscriber());
}
......@@ -31,7 +31,7 @@ public function build(ContainerBuilder $container) {
->addArgument(new Reference('cache.rdf.site_schema.types'));
// Mapping manager service.
$container->register('rdf.mapping_manager', 'Drupal\rdf\RdfMappingManager')
->addArgument(new Reference('dispatcher'))
->addArgument(new Reference('event_dispatcher'))
->addArgument(new Reference('rdf.site_schema_manager'));
// Mapping subscriber.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment