Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a bundle, component and a service in Symfony Framework?

What is a difference between bundle, component, service in Symfony? Thank you in advance

like image 442
Kevin7 Avatar asked Sep 24 '15 21:09

Kevin7


People also ask

What is a bundle in Symfony?

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.

How does Symfony PHP work?

Summary: Symfony is an open-source PHP web app framework for developers seeking a simple and elegant toolkit for building full-featured web applications. It works with an independent library and the PHP Unit. Symfony is heavily influenced by the web application frameworks Ruby on Rails, Django, and Spring.


1 Answers

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

like image 83
LorenzSchaef Avatar answered Sep 27 '22 20:09

LorenzSchaef