Download the PHP package gmizera/service-bus-lite-bundle without Composer
On this page you can find all versions of the php package gmizera/service-bus-lite-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gmizera/service-bus-lite-bundle
More information about gmizera/service-bus-lite-bundle
Files in gmizera/service-bus-lite-bundle
Package service-bus-lite-bundle
Short Description ServiceBus bundle implementation updated for Symfomy 4
License MIT
Homepage https://github.com/gmizera/service-bus-lite-bundle
Informations about the package service-bus-lite-bundle
Service Bus Bundle
Updated for use with Symfony 4.4
Bundle that integrates Service Bus into Symfony2 through a bundle.
Installation using Composer
This bundle can be installed using composer by adding the following in the require
section of your composer.json
file:
Then, enable the bundle in the AppKernel:
How to use
Create Query or Command Handlers that implement ServiceBus\IQueryHandler
or ServiceBus\ICommandHandler
respectively such as:
Then register the Handler as a service, tagged as a ServiceBus Handler in services.yml:
Tagging this service as a command or query handler will allow the service bus to register this class as an awaiting handler for an upcoming command.
Now all you have to do is initialise a FooCommand within your Controller and send to the ServiceBus
In the background, the ServiceBus will find the associated Handler where you would code the logic required for that specific action.
Further code example can be found in the example folder of the main repository
Note: It is important that your Command
and your CommandHandler
classes have Command and CommandHandler appended to the Class name for the ServiceBus to find the related CommandHandler for a raised Command.
All versions of service-bus-lite-bundle with dependencies
symfony/framework-bundle Version 4.*
gmizera/service-bus-lite Version 1.*