If you've been around the Symfony community for some time, odds are you know and have used the SensioGeneratorBundle. It's a popular bundle (+20 million downloads) that provides console commands to generate boilerplate code, like controllers and entities. It also includes a basic CRUD generator.
Given that SensioGeneratorBundle is starting to show its age and considering the massive simplifications introduced by Symfony 4, we decided to stop evolving that bundle and we've created a new bundle called SymfonyMakerBundle.
SymfonyMakerBundle helps you creating empty commands, controllers, form classes, tests and more so you can forget about the required boilerplate code. It's an alternative to SensioGeneratorBundle for modern Symfony applications and requires using Symfony 3.4 or newer and Symfony Flex.
Of course the end goal is to not have boilerplate code at all in Symfony applications. Symfony 4 made a lot of improvements towards that goal, but you will always have to bootstrap some code, so having a modern, simple and lightweight bundle to do that is nice.
The usage of the bundle is similar to SensioGeneratorBundle, but the commands
now use the make:
prefix instead of generate:
. In this first version of
the bundle we've implemented the following makers:
1 2 3 4 5 6 7 8 9 10 11 12 | $ php bin/console list make
make:command
make:controller
make:entity
make:form
make:functional-test
make:subscriber
make:twig-extension
make:unit-test
make:validator
make:voter
|
Later we'll add more commands, including some interactive makers to generate a Doctrine entity asking for its properties, to generate a form based on a Doctrine entity, etc.
The best way to help us is to test it in your own applications and report any issue or uncovered edge case. You can also review the code to improve it using any of the modern PHP 7.1 features.
If you have ideas for new features or maker commands, please open an issue to discuss about them instead of sending a pull request.
Finally, it'd be great if you could give this project a GitHub Star because that motivates us a lot.
What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...