PHPackages                             symplify/symfony-event-dispatcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. symplify/symfony-event-dispatcher

Abandoned → [contributte/event-dispatcher](/?search=contributte%2Fevent-dispatcher)Library[Utility &amp; Helpers](/categories/utility)

symplify/symfony-event-dispatcher
=================================

Symfony\\EventDispatcher integration to Nette.

v1.4.10(9y ago)020.0k3PHP ^7.1

Since Dec 18Compare

[ Source](https://github.com/deprecated-packages/SymfonyEventDispatcher)[ Packagist](https://packagist.org/packages/symplify/symfony-event-dispatcher)[ RSS](/packages/symplify-symfony-event-dispatcher/feed)WikiDiscussions Synced 2w ago

READMEChangelogDependencies (10)Versions (13)Used By (3)

The Simplest [Symfony Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher.html) integration to Nette
=============================================================================================================================

[](#the-simplest-symfony-event-dispatcher-integration-to-nette)

[![Build Status](https://camo.githubusercontent.com/b6bedacb39a186a2d0617f155ea8540fa12acb4b72cf0cef9a0ee1c4ec917761/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53796d706c6966792f53796d666f6e794576656e74446973706174636865722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Symplify/SymfonyEventDispatcher)[![Code Coverage](https://camo.githubusercontent.com/29dbdbf9dc63549b42b1a16ba3cb1e638cf7c75b51023def8bf4613505b74fb3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f53796d706c6966792f53796d666f6e794576656e74446973706174636865722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Symplify/SymfonyEventDispatcher)[![Downloads](https://camo.githubusercontent.com/69ae9ac4649802fbc9f4adfc17268001c7cdab20ea913006d1a0538dc2aac7aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f73796d666f6e792d6576656e742d646973706174636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/symfony-event-dispatcher)

Install
-------

[](#install)

```
composer require symplify/symfony-event-dispatcher
```

Register the extension in `config.neon`:

```
# app/config/config.neon

extensions:
	- Symplify\SymfonyEventDispatcher\Adapter\Nette\DI\SymfonyEventDispatcherExtension
```

Usage
-----

[](#usage)

See [short article about EventDispatcher](http://pehapkari.cz/blog/2016/12/05/symfony-event-dispatcher). **This article is tested** – it will be still up-to-date with Symfony 4+.

### 1. Create class that implements `Symfony\Component\EventDispatcher\SubscriberInterface`:

[](#1-create-class-that-implements-symfonycomponenteventdispatchersubscriberinterface)

```
// app/EventSubscriber/CheckRequestEventSubscriber.php

namespace App\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent

final class CheckRequestEventSubscriber implements EventSubscriberInterface
{
    /**
     * @var bool
     */
    public $isUserNotified = false;

    public static function getSubscribedEvents(): array
    {
        // in format ['event name' => 'public function name that will be called']
        return [KernelEvents::REQUEST => 'validateRequest'];
    }

    // Appropriate event object is passed in arguments
    public function validateRequest(GetResponseEvent $event): void
    {
        // some logic to send notification
        $this->isUserNotified = true;
    }
}
```

### 2. Register it to services

[](#2-register-it-to-services)

```
# app/config/config.neon

services:
    - App\EventSubscriber\CheckRequestEventSubscriber
```

And it works :)

That's all!

Contributing
------------

[](#contributing)

Send [issue](https://github.com/Symplify/Symplify/issues) or [pull-request](https://github.com/Symplify/Symplify/pulls) to main repository.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

12

Last Release

3396d ago

Major Versions

v1.4.10 → v2.0.0-RC12017-04-14

PHP version history (2 changes)v1.2.19PHP ^7.0

v1.4.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symplify-symfony-event-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-symfony-event-dispatcher/health.svg)](https://phpackages.com/packages/symplify-symfony-event-dispatcher)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M418](/packages/easycorp-easyadmin-bundle)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k257.3M12.3k](/packages/symfony-framework-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k190.0M2.6k](/packages/symfony-security-bundle)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k52](/packages/civicrm-civicrm-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M668](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
