twc / bus-bundle
Provide simple way to implement Message Bus concept in Symfony 4
Installs: 235
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- symfony/dependency-injection: ^4.4|^5.3
- symfony/framework-bundle: ^4.4|^5.3
README
Provide simple way to implement Message Bus concept in Symfony.
Before start
Thank's @lilobase for you excellent talk at PHP TOUR 2018.
Thank's @matGiWeb for you approach with cqrs-skeleton
Remember
CQRS (Command Query Responsibility Segregation) it's an architectural pattern that aims to separate the writing (Command) and reading (Query).
Pré-requis
symfony powerfull DI with autowire and autoconfigure enable
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
public: false
Installation
composer require twc/bus-bundle
How to use ?
If you know CQRS pattern, you only have to implement the desired interface
About Commands
About Events
About Queries
About Bus
That's all !
CommandBus, EventBus, QueryBus will do the work, thank's Dependencies Injection and autowiring in symfony.