Latest in branch 2.0
2.0.25
Released 10 Oct 2013
(12 years ago)
SoftwareSymfony
Version2.0
Status
End of life
Supported
PHP versions
PHP ≥ 5.3.2
Initial release2.0.0
28 Jul 2011
(14 years ago)
Latest release2.0.25
10 Oct 2013
(12 years ago)
End of bug fixesMar 2013
(Ended 13 years, 2 months ago)
End of security fixesMar 2013
(Ended 13 years, 2 months ago)
Release noteshttps://github.com/symfony/symfony/releases/tag/v2.0.25
Source codehttps://github.com/symfony/symfony/tree/v2.0.25
Documentationhttps://symfony.com/doc/current/index.html
Downloadhttps://symfony.com/download
Symfony 2.0 ReleasesView full list

What Is New in Symfony 2.0

Symfony 2.0 is a complete rewrite, introducing a new architectural foundation centered around a powerful Dependency Injection container and a modular Bundle system. This version shifts from a monolithic framework to a set of decoupled, reusable components.

Category Key Changes
New Features Dependency Injection Container, Bundle system, HttpFoundation & HttpKernel components, Twig integration, Console component.
Architectural Changes Full rewrite, component-based structure, PSR-0 autoloading, decoupled core.
Improvements Configuration with YAML/XML/PHP, enhanced routing, improved security layer, faster templating.
Deprecated / Removed Old sfContext, sfController, and the previous plugin system are gone.

How Did the Dependency Injection Container Change Everything?

The new Dependency Injection (DI) container is the heart of Symfony 2.0. It manages object creation and wiring, promoting loose coupling and testability. In practice, this means your application's services are defined as configurable objects in the container.

Configuration can be written in YAML, XML, or PHP, giving developers choice. This approach makes every aspect of your application easily replaceable and configurable, which was a significant limitation in the older, more static architecture.

What Replaced Plugins and Applications in the New Bundle System?

The Bundle system replaces the old plugin and application model. Everything in Symfony 2.0 is a bundle, including your core application code, third-party libraries, and shared features.

A bundle is a directory that houses everything related to a specific feature: PHP classes, configuration, templates, stylesheets, and even tests. This modular design allows for true code reuse and clean separation of concerns across projects.

Why Are the HttpFoundation and HttpKernel Components So Fundamental?

These two new components provide the essential abstraction layer for handling HTTP requests and responses. HttpFoundation introduces object-oriented request and response objects, replacing the old global variable access.

The HttpKernel is the core that handles turning a Request into a Response through a flexible event-driven process. This matters because it standardizes the application flow and enables powerful features like the HTTP cache and the php app/console command-line tool.

Is Twig Now the Default Templating Engine?

Yes, Twig is integrated as the recommended and default templating engine in Symfony 2.0. It offers a cleaner, more secure syntax compared to PHP templates, with automatic escaping and a concise block inheritance model.

While PHP templates are still supported, Twig's integration is seamless and aligns with the framework's modern, secure-by-default philosophy. Its syntax is easier for front-end developers to read and maintain.

How Does the New Configuration System Improve Developer Experience?

Symfony 2.0 offers a unified configuration system that works across YAML, XML, and PHP formats. This flexibility lets teams choose the format that best fits their project's needs or their personal preference.

The configuration is used to define services in the DI container, set application parameters, and configure bundles. This centralized, structured approach is a major improvement over the scattered and inconsistent configuration methods of the past.

FAQ

Is Symfony 2.0 backward compatible with Symfony 1.4?
No, it is not. Symfony 2.0 is a complete rewrite with a new architecture. Migrating from 1.x requires a significant overhaul of your application's codebase to adopt the Bundle system and Dependency Injection.

Can I still use PHP for templates in Symfony 2.0?
Yes, PHP templates are still supported as an alternative. However, Twig is the default and recommended engine due to its security features and cleaner syntax.

What happened to the old plugin system and symfony plugins website?
The old plugin system is entirely removed. Its functionality is replaced by Bundles, which are distributed as Composer packages via Packagist, not through a dedicated Symfony website.

Do I need to use the entire Symfony framework, or can I use just components?
A key goal of Symfony 2.0 is decoupling. You can use individual components (like HttpFoundation or Console) in any PHP project without installing the full-stack framework.

How is routing configured in Symfony 2.0?
Routing configuration is typically stored in YAML, XML, or PHP files separate from the controller logic. Routes are imported from bundle resources, making them more modular and easier to manage than the previous monolithic routing.yml approach.

Releases In Branch 2.0

VersionRelease date
2.0.2510 Oct 2013
(12 years ago)
2.0.2407 Aug 2013
(12 years ago)
2.0.2320 Mar 2013
(13 years ago)
2.0.2217 Jan 2013
(13 years ago)
2.0.2121 Dec 2012
(13 years ago)
2.0.2020 Dec 2012
(13 years ago)
2.0.1929 Nov 2012
(13 years ago)
2.0.1825 Oct 2012
(13 years ago)
2.0.1728 Aug 2012
(13 years ago)
2.0.1611 Jul 2012
(13 years ago)
2.0.1530 May 2012
(14 years ago)
2.0.1417 May 2012
(14 years ago)
2.0.1330 Apr 2012
(14 years ago)
2.0.1219 Mar 2012
(14 years ago)
2.0.1124 Feb 2012
(14 years ago)
2.0.1006 Feb 2012
(14 years ago)
2.0.906 Jan 2012
(14 years ago)
2.0.826 Dec 2011
(14 years ago)
2.0.708 Dec 2011
(14 years ago)
2.0.616 Nov 2011
(14 years ago)
2.0.502 Nov 2011
(14 years ago)
2.0.404 Oct 2011
(14 years ago)
2.0.225 Sep 2011
(14 years ago)
2.0.325 Sep 2011
(14 years ago)
2.0.126 Aug 2011
(14 years ago)
2.0.028 Jul 2011
(14 years ago)
2.0.0-RC623 Jul 2011
(14 years ago)
2.0.0-RC522 Jul 2011
(14 years ago)
2.0.0-RC404 Jul 2011
(14 years ago)
2.0.0-RC227 Jun 2011
(14 years ago)
2.0.0-RC327 Jun 2011
(14 years ago)
2.0.0-RC124 Jun 2011
(14 years ago)
2.0.0-BETA516 Jun 2011
(14 years ago)
2.0.0-BETA406 Jun 2011
(15 years ago)
2.0.0-BETA327 May 2011
(15 years ago)
2.0.0-BETA223 May 2011
(15 years ago)
2.0.0-BETA129 Apr 2011
(15 years ago)