Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
22 Dec 2012 at 12:06 UTC
Updated:
29 Jul 2014 at 21:41 UTC
Jump to comment: Most recent file
The dispatcher service in Symfony is named "event_dispatcher". For better interoperability, using the same name in Drupal would help a lot.
The patch renames the service from "dispatcher" to "event_dispatcher" everywhere it is used.
I've also removed this code:
// 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')));
as it is done elsewhere in the same file:
$container->register('config_global_override_subscriber', 'Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber')
->addTag('event_subscriber');
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | event_dispatcher_5.patch | 6.19 KB | fabpot |
| event_dispatcher.patch | 5.51 KB | fabpot |
Comments
Comment #2
fabpot commentedevent_dispatcher.patch queued for re-testing.
Comment #4
aspilicious commentedWhy are you removing this?
Hmm? We are registring the same service "dispatcher" twice?
Seems like a mistake.
Besides of that you forgot to rename 'dispatcher' in core/modules/rdf/lib/.../RdfBundle
Comment #5
fabpot commentedI've fixed the missing occurrence of the
dispatcherservice usage (I was working on an old version of the 8.x branch where the RdfBundle class did not exist).Comment #6
Crell commentedOh those tricky out of date branches...
Comment #7
chx commentedI see. fabpot's xmas present to us is working on Drupal 8. Thanks much :)
Comment #8
webchickCool! :D
Committed and pushed to 8.x. Thanks, fabpot! :)