Custom bundles versus AppBundle

When we use AppBundle as a code base, the app/ directory of our project can be seen as part of AppBundle. Sure, it has other files and folders that take care of other bundles available in the /vendor directory, for example, but we can benefit a lot from the app/ folder.

For example, if you look at the MyBundle/Resources folder, you will find two subfolders named Resources/config/ and Resources/views/, which hold service definitions (and other required settings in the future) and template files for that bundle.

However, with AppBundle, we already have a folder named app/, so conveniently, we can use the available app/config for our configuration needs and app/Resources/views for our templates. Using this approach, ...

Get Mastering Symfony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.