symfony/symfony — pull request #7582 by drak (2013-04-06 19:00:31+00:00)
Title: [2.3][EventDispatcher] Moved EventDispatcher awareness to separate baseclass

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | todo

A feature was added to inject the `EventDispatcher` into every `Event` object on the off-chance that if an Event needed to access the `EventDispatcher` it could get it for free.

I don't believe this was a very good choice because `Event` object are now exceedingly difficult to debug - if you `var_dump()` one when using Symfony Fullstack Framework, you'' get an event, with the event dispatcher in it, which has the DIC injected into that (which has the event dispatcher as a property :) and it's just a mess to see anything relevant.

So I have opted to separate Events into an EventDispactherAware events which can be used as a separate base-class if necessary. I believe that is the best compromise.