What does the bundle, vendor and bridge of Symfony mean?
A bridge is a set of classes that aims at extending a library into Symfony2. A bridge is part of the core.
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.
In general, vendor
are the dependencies of your project (aka third party libraries). It's the same meaning in Symfony2.
From the documentation about bundles:
A bundle is a directory that has a well-defined structure and can host anything from classes to controllers and web resources.
In other words, it's a part of your application which owns a logic (controllers, views, models). Bundles can also wrap a library. For example, the BazingaGeocoderBundle wraps the Geocoder library. It provides Symfony2 oriented features to ease the use of a library in a Symfony2 project. Also, it can be a glue between components.
A bridge is a set of classes that aims at extending a library into Symfony2. A bridge is part of the core. You can find a bridge for the third libraries that could be in the core (Twig, Doctrine, Propel, Monolog, etc.). If you don't want to use Doctrine as ORM, then you don't care about the EntityType
. That's why this class is in the bridge.
To sum up, a bridge extends some components and a bundle adds features to the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With