PHPackages                             alanpoulain/api-platform-events-bundle - 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. [API Development](/categories/api)
4. /
5. alanpoulain/api-platform-events-bundle

ActiveSymfony-bundle[API Development](/categories/api)

alanpoulain/api-platform-events-bundle
======================================

Makes API Platform send its own events

v0.1.0(6y ago)174.2k5MITPHPPHP &gt;=7.2CI failing

Since Oct 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alanpoulain/ApiPlatformEventsBundle)[ Packagist](https://packagist.org/packages/alanpoulain/api-platform-events-bundle)[ RSS](/packages/alanpoulain-api-platform-events-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (11)Versions (2)Used By (0)

API Platform Events Bundle
==========================

[](#api-platform-events-bundle)

[![Coverage Status](https://camo.githubusercontent.com/9783c836009d1609f2ea37669d6d99b857c11b9dfce6628b6586c0c436c98331/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c616e706f756c61696e2f417069506c6174666f726d4576656e747342756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/alanpoulain/ApiPlatformEventsBundle?branch=master)[![GitHub Actions](https://github.com/alanpoulain/ApiPlatformEventsBundle/workflows/CI/badge.svg)](https://github.com/alanpoulain/ApiPlatformEventsBundle/actions?workflow=CI)

Makes [API Platform](https://api-platform.com/) send its own events.

**It supports only GraphQL (for now).**

Please support the [Stages RFC](https://github.com/api-platform/core/pull/2978) if you want a support for REST.

This bundle is useful if you *really* want to use events. The recommended way to add your logic is to [decorate the stages](https://api-platform.com/docs/core/graphql/#workflow-of-the-resolvers).

With this bundle, the following events will be dispatched during a query or a mutation executed by API Platform:

EventQueryMutationPreReadEventsent ✔️️sent ✔️PostReadEventsent ✔️sent ✔️PreDeserializeEventnot sent ❌sent ✔️PostDeserializeEventnot sent ❌sent ✔️PreValidateEventnot sent ❌sent ✔️PostValidateEventnot sent ❌sent ✔️PreWriteEventnot sent ❌sent ✔️PostWriteEventnot sent ❌sent ✔️PreSerializeEventsent ✔️sent ✔️PostSerializeEventsent ✔️sent ✔️By using [Event Listeners](https://symfony.com/doc/current/event_dispatcher.html), you can add your custom logic where you need.

In an event sent by this bundle, you have access to:

- the related resource,
- the operation name (`get`, `delete`, etc.),
- the related data (if it makes sense),
- the context (an array with some useful data).

Installation
------------

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require alanpoulain/api-platform-events-bundle
```

### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

#### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require alanpoulain/api-platform-events-bundle
```

#### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    ApiPlatform\EventsBundle\ApiPlatformEventsBundle::class => ['all' => true],
];
```

Documentation
-------------

[](#documentation)

For an explanation of how it works, please read the [documentation](Resources/doc/index.md).

License
-------

[](#license)

This package is available under the [MIT license](LICENSE).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

2389d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da08ebc4ac8aac1a8fac352d831d1b610913edbb5099252e02361081b5b8a066?d=identicon)[Alan Poulain](/maintainers/Alan%20Poulain)

---

Top Contributors

[![alanpoulain](https://avatars.githubusercontent.com/u/10920253?v=4)](https://github.com/alanpoulain "alanpoulain (3 commits)")

---

Tags

eventsapi-platform

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alanpoulain-api-platform-events-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/alanpoulain-api-platform-events-bundle/health.svg)](https://phpackages.com/packages/alanpoulain-api-platform-events-bundle)
```

###  Alternatives

[indragunawan/api-rate-limit-bundle

Rate limits protection for api-platform resources.

68112.4k](/packages/indragunawan-api-rate-limit-bundle)[mpociot/captainhook

Add webhooks to your Laravel app.

3358.9k](/packages/mpociot-captainhook)[keen-io/keen-io-bundle

Symfony Bundle for Keen IO

16488.5k](/packages/keen-io-keen-io-bundle)[rekalogika/mapper

An object mapper for PHP and Symfony. Maps an object to another object. Primarily used for transforming an entity to a DTO and vice versa.

3847.7k1](/packages/rekalogika-mapper)[there4/php-analytics-event

Send Google Analytics events from PHP

2441.1k](/packages/there4-php-analytics-event)[lisennk/laravel-slack-events-api

Slack Events API for Laravel 5, 6, 7 and 8

3911.4k](/packages/lisennk-laravel-slack-events-api)

PHPackages © 2026

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