Permalink
Browse files

Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDi…

…spatcher

The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.

The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.

The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
  • Loading branch information...
1 parent f8593f7 commit c0f5364342863351146fe86cd1fad9ccfdfa1d6a @fabpot fabpot committed Jul 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Event.php
View
@@ -74,19 +74,19 @@ public function stopPropagation()
/**
* Stores the EventDispatcher that dispatches this Event
*
- * @param EventDispatcher $dispatcher
+ * @param EventDispatcherInterface $dispatcher
*
* @api
*/
- public function setDispatcher(EventDispatcher $dispatcher)
+ public function setDispatcher(EventDispatcherInterface $dispatcher)
{
$this->dispatcher = $dispatcher;
}
/**
* Returns the EventDispatcher that dispatches this Event
*
- * @return EventDispatcher
+ * @return EventDispatcherInterface
*
* @api
*/

0 comments on commit c0f5364

Please sign in to comment.