Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 4 bundles working

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?

like image 366
A.Seddighi Avatar asked Dec 01 '17 13:12

A.Seddighi


People also ask

What are bundles in Symfony?

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.

What is a bundle in PHP?

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.


1 Answers

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

like image 119
GuillaumeL Avatar answered Nov 06 '22 15:11

GuillaumeL