Problem/Motivation
#3049525: Enable service autowiring by adding interface aliases to core service definitions added service aliases to allow for autowiring services. There is a service alias @event_dispatcher for event dispatcher (Symfony\Contracts\EventDispatcher\EventDispatcherInterface). However, in order to allow autowiring services which typehint against Psr\EventDispatcher\EventDispatcherInterface, that interface should be added as an additional alias.
Steps to reproduce
Proposed resolution
Add Psr\EventDispatcher\EventDispatcherInterface: '@event_dispatcher' to core.services.yml.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3401331
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
znerol commentedComment #4
smustgrave commentedWith my limited knowledge of autowire, mainly reviewing other tickets, don't see any issue with this
Comment #5
longwaveWhy not, if it makes autowiring simpler. This is borderline for backporting, can't see it causing any problems but also if you want this you can probably wait until 10.3.
Committed 1d405d1 and pushed to 11.x. Thanks!