Google News
logo
Symfony - Interview Questions
What are bundles in Symfony?
Symfony bundle are very similar to plugins or packages in other frameworks or CMS. In Symfony, everything is a bundle from core framework components to code you write.The bundle gives the flexibility to use pre-built features packaged in third-party bundles or to create and distribute your own bundles. Generally, a Bundle contains the following directories and files.
 
Controller Directory : Contains controllers of the bundle
DependencyInjection Directory : Hold dependency injection, extension classes.
Resources/config/ Directory : Contains configuration files like routing.yaml.
Resources/views/ Directory : Contain view files of the bundle.
Resources/public/ Directory : Contains static resources such as images, stylesheets of a bundle.
Tests/ Directory : Contains all test files for the bundle.
 
There are two types of bundles are available in Symfony :
 
* Application-specific bundles : only used to build your application.
* Reusable bundles : meant to be shared across many projects.
Advertisement