How can I create library bundle on Symfony 4?
In Symfony 3 I use this command: php bin/console generate:bundle
but in new version not working.
And is possible use bundles like Symfony 3, for example, i have blog bundle and telegram bot bundle if not possible how to simulate in Symfony 4?
A Symfony bundle is a collection of files and folders organized in a specific structure. The bundles are modeled in such a way that it can be reused in multiple applications. The main application itself is packaged as a bundle and it is generally called AppBundle.
A bundle can be considered essentially a plugin for a Symfony project; it can wrap any functionality found in a Symfony application including configuration, controllers, routes, services, event listeners, templates, etc.
the logic for creating bundle doesn't change since Symofony 2.x. But now bundles are just packages, use for reusable features. If you want to develop your own bundle just follow this post Symfony2 - creating own vendor bundle - project and git strategy Since Symfony Generate Bundle isn't supported anymore in 4.x you have to follow this other post: Best Practices for Reusable Bundles
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With