First We need to know that use case of a bundle and why we are using it. if you want to create a specific feature library then you can create a bundle but bundle can be accessible publicly or private. but most of the case bundles are inside the src folder if you want to manage your bundle outside of the src folder then how will you manage bundle.
All of the bundles autoloading with help of namespaces. it means first you need to define a namespace for your bundle but where you need to define it.
let’s start
Goto project root directory and open composer.json file and find
Then create your bundle which is must be inside Ecommerce Directory and Bundle name AcmeBundle.
After complete define namespace, you need to run the following command.
composer dump-autoload
so that making changes can occur.
After running the command you can register bundle according to Symfony configuration and start coding……
Be the first to comment.