Download the PHP package romaindesajardim/broadway-generator-bundle without Composer
On this page you can find all versions of the php package romaindesajardim/broadway-generator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download romaindesajardim/broadway-generator-bundle
More information about romaindesajardim/broadway-generator-bundle
Files in romaindesajardim/broadway-generator-bundle
Package broadway-generator-bundle
Short Description This bundle generates code for you
License MIT
Informations about the package broadway-generator-bundle
BroadwayGeneratorBundle
This bundle gives some symfony commands to generate Commands, Events, ReadModels, and more, for Broadway.
This bundle is highly inspired by SensioGeneratorBundle
Installation
Install it with composer
and add it to your AppKernel.php
Features
Actually there is only one command available. More will come soon ...
Broadway Commands
This command generate a Broadway command and implements the handle method in the Broadway Command Handler automatically. You have just to add your parameters and code the handler.
:warning: If you use Symfony 2, use app/console instead of bin/console
This command need 3 inputs :
bundle(The bundle name where the Broadway Command will be generate)name(The name of the Broadway Command you want)-
command-handlerOptionnal (The Command Handler's service id where the Broadway Command will be handle)By default the command is run in the interactive mode and asks questions to determine values of thoose inputs
But if you want, you can run the command in a non-interactive mode and providing the needed inputs
Exemple
Imagine I have my Broadway Command Handler
FooBarBundle\FooBarCommandHandlerlinked by a Symfony service :
And I want to create a Broadway Command FooBar in the same bundle as my Command Handler FooBarBundle
So in a non interactive mode I have to launch this command :
php bin/console rdsj:broadway:generate-command --no-interaction FooBarBundle FooBar foo.bar.command_handler
The result will be :
A new file Command\FooBarCommand.php
And a new handle method a the end of my Command Handler FooBarCommandHandler.php
Broadway Events
This command generate a Broadway event and implements the handle method in the Broadway Projector automatically. You have just to add your parameters and code the handler.
:warning: If you use Symfony 2, use app/console instead of bin/console
This command need 3 inputs :
bundle(The bundle name where the Broadway Command will be generate)name(The name of the Broadway Command you want)-
projectorOptionnal (The Projector's service id where the Broadway Event will be handle)By default the command is run in the interactive mode and asks questions to determine values of thoose inputs
But if you want, you can run the command in a non-interactive mode and providing the needed inputs
Exemple
Same as Broadway Commands' one
Broadway ReadModel's
This command generate a Broadway ReadModel and add it to the service configuration of you're bundle. You have just to add your parameters and code the ReadModel.
:warning: If you use Symfony 2, use app/console instead of bin/console
This command need 3 inputs :
bundle(The bundle name where the Broadway Command will be generate)name(The name of the Broadway Command you want)-
service-filenameOptionnal _(The service filename is the name of the file where your bundle services are configurated)By default the command is run in the interactive mode and asks questions to determine values of thoose inputs
But if you want, you can run the command in a non-interactive mode and providing the needed inputs
Exemple
This command generate a ReadModel like this.
and transform service.xml
in
in order to configure the new ReadModel service
TODO
- [ ] Add a command to apply or handle an event in a projector, processor or saga
- [x] Add a command to generate Broadway Event
- [x] Add a command to generate Broadway ReadModel
- [ ] Add a command to generate Broadway Command Handler
- [ ] Generate Command handler automatically if it doesn't exist on Broadway Command creation
- [ ] Add fields to Broadway Command to add fields and implements getters
Reporting an issue or a feature request
You feel free to report a new issue or a feature requests if it doesn't already exist or is in the Todo list (for feature request)
Contribute
You feel free to open pull request
All versions of broadway-generator-bundle with dependencies
broadway/broadway-bundle Version ~0.1
symfony/serializer Version ~2.7|~3.0