What is the difference between a bundle, component and a service in Symfony Framework?
Bundle: A collection of code and other files written for use in a Symfony application.http://symfony.com/doc/current/book/bundles.html
Component: Parts of the Framework that handle a certain task. They can also be used without the Framework.http://symfony.com/doc/current/components/index.html
Service: Just a php class that provides certain functionality. It can be loaded through the Service Container which automatically handles dependencies.http://symfony.com/doc/current/book/service_container.html
As I understand:
- Components - standalone official libraries that can be used ether separately from Symfony framework or as a part of so called "Symfony-framework-skeleton". They are independent from other libraries.
- Bundles - libraries that are additional to "core Symfony". They are dependent from Symfony components.
- Services - libraries written by usual users for local projects that can be reused in different projects.
Service is any php class that has a relation with the dependency injection container, meaning that the container is able to manage it.
A component is a self contained entity that has usability even outside of a symfony based application, a library like PDO.
A bundle is symfony flex abstraction for providing simple modularity including configurations and automations.
So a bundle can be made out of a component.