phil / outbox-bundle
phil/outbox in Symfony: events saved in a table of your Doctrine connection, delivered by a command or the Scheduler, with retries and a Messenger bridge.
Package info
github.com/parler-haut-interagir-librement/outbox-bundle
Type:symfony-bundle
pkg:composer/phil/outbox-bundle
Requires
- php: >=8.5
- ext-mbstring: *
- doctrine/dbal: ^4.6
- phil/outbox: ^0.2@dev
- psr/event-dispatcher: ^1.0
- symfony/clock: ^8.2
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
Requires (Dev)
- ext-pdo: *
- doctrine/doctrine-bundle: ^3.4
- doctrine/orm: ^3.8
- phpunit/phpunit: ^13.4
- psr/log: ^3.0
- symfony/console: ^8.2
- symfony/event-dispatcher: ^8.2
- symfony/framework-bundle: ^8.2
- symfony/http-kernel: ^8.2
- symfony/lock: ^8.2
- symfony/messenger: ^8.2
- symfony/scheduler: ^8.2
Suggests
- doctrine/orm: To add the outbox table to the schema the ORM generates
- symfony/console: For phil:outbox:relay, phil:outbox:schema, phil:outbox:purge and the commands of the dead records
- symfony/lock: For one run of the relay at a time
- symfony/messenger: To relay the events to a Messenger bus, and for the scheduled trigger
- symfony/scheduler: For the scheduled trigger of the relay
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-25 13:24:31 UTC
README
phil/outbox in Symfony: events saved in a table of your Doctrine connection, delivered by a command or the Scheduler, with retries and a Messenger bridge.
phil/outbox-bundle integrates phil/outbox with Symfony. The libraries that record events through the outbox stay free of Symfony and of Messenger; the bundle keeps their records next to their tables and relays them to the application's listeners. The library alone suits an application without Symfony.
Status
| Part | State |
|---|---|
DbalOutboxStore: one table of the application's connection, joined to the caller's transaction, tested on SQLite, MySQL 8.4 and PostgreSQL 17 |
Implemented and tested |
The table in the schema the ORM generates, and phil:outbox:schema |
Implemented and tested |
| The codecs by tag, the generic event types, the outbox, the relay and the housekeeping as services | Implemented and tested |
phil:outbox:relay: bounded batches, --stop-when-empty, a time limit, a lock, the signals |
Implemented and tested |
| The commands of the dead records and the purge of the delivered records | Implemented and tested |
phil:outbox:errors:clear: the messages removed from the errors already kept |
Implemented and tested |
| The scheduled trigger and the bridge to a Messenger bus | Implemented and tested |
| The Flex recipe | Implemented |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, and creating the table. |
| Configuration | Every option, with an example. |
| Console | The relay command and the commands of the dead records, the purge, the errors and the schema. |
| Workers | Running the relay under a process manager, in worker mode, or on a schedule. |
| Messenger | The bridge to a bus, and when Messenger's own outbox and inbox fit better. |
| Extension points | The services to replace, the tags to add to, and when they are stable. |
| Testing | The bundle's tests, and the servers its integration tests read. |
| Reference | Every class and service of the bundle. |
Quick start
composer require phil/outbox-bundle
php bin/console phil:outbox:schema --force # or doctrine:migrations:diff with the ORM
# config/packages/phil_outbox.yaml phil_outbox: connection: default generic_types: [quiz.completed]
// In the transaction of the write it describes: $outbox->record('quiz.completed', ['quiz' => 'q-42', 'member' => 7]);
php bin/console phil:outbox:relay
Requirements
PHP 8.5 or later, Symfony 8.2 or later and Doctrine DBAL 4.5 or later.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.