-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
EventDispatcherRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | no |
| BC Break report? | no |
| RFC? | yes |
| Symfony version | all |
Today I struggled a lot with a stupid bug, because I was using the RegisterListenersPass, and I was passing the wrong service name for the EventDispatcher. If the container complainer with a ServiceNotFoundException I would have catched that issue days ago! There's a reason behind this? Could we make this change?
// Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
- return;
+ throw new ServiceNotFoundException($this->dispatcherService);
}Obviously we can think of a more convoluted solution, but still this issue remains, IMHO. And 4.x is coming, so a BC wouldn't be an issue here.
ostrolucky
Metadata
Metadata
Assignees
Labels
EventDispatcherRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)