Skip to content


Subversion checkout URL

You can clone with
Download ZIP
[READ-ONLY] Subtree split of the Symfony EventDispatcher Component -- clone into Symfony/Component/ (master at symfony/symfony)
Latest commit d36355e @fabpot fabpot Merge branch '2.8'
* 2.8:
  added the new Composer exclude-from-classmap option
  added the new Composer exclude-from-classmap option
  fix docblock description for the build() method
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices

EventDispatcher Component

The Symfony EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible.

use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;

$dispatcher = new EventDispatcher();

$dispatcher->addListener('event_name', function (Event $event) {
    // ...



You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/EventDispatcher/
$ composer install
$ phpunit
Something went wrong with that request. Please try again.