Most of the popular frameworks and platforms support some form of modules, plugins, extensions or bundles. For most of the time, the difference really lies just in the naming, while the concept of extensibility and modularity is the same. With Symfony, these modular blocks are called bundles.
Bundles are a first-class citizen in Symfony, as they support all of the operations available to other components. Everything in Symfony is a bundle, even the core framework. Bundles enable us to build modularized applications, whereas the entire code for a given feature is contained within a single directory.
A single bundle holds all its PHP files, templates, style sheets, JavaScript files, tests, and anything else in one root directory.
When we first setup our test app, it created an AppBundle
for us, under the src
directory. As we moved forward with the auto-generated CRUD, we saw our bundle getting all sorts of directories and files.
For a bundle to be noticed by Symfony, it needs...