Stable Release in branch 2.8 (LTS)
2.8.52
Released 13 Nov 2019
(6 years ago)
SoftwareSymfony
Version2.8 (LTS)
StatusLTS
End of life
Supported
PHP versions
PHP ≥ 5.3.9
Initial release2.8.0
30 Nov 2015
(10 years ago)
Latest release2.8.52
13 Nov 2019
(6 years ago)
End of bug fixesNov 2018
(Ended 7 years ago)
End of security fixesNov 2019
(Ended 6 years ago)
Release noteshttps://github.com/symfony/symfony/releases/tag/v2.8.52
Source codehttps://github.com/symfony/symfony/tree/v2.8.52
Documentationhttps://symfony.com/doc/current/index.html
Downloadhttps://symfony.com/download
Symfony 2.8 (LTS) ReleasesView full list

What Is New in Symfony 2.8 (Summary)

Symfony 2.8 introduces a range of new features, improvements, and deprecations to prepare for the upcoming 3.0 release. This version focuses on modernizing the codebase and adding useful utilities. Below is a high-level overview of the key changes.

Category Key Changes
New Features New Process component, LDAP component, LockHandler, PSR-6 Cache bridge, and more.
Improvements & Additions Enhanced DebugClassLoader, new form themes, HTTP status code constants, and new validators.
Deprecations Numerous methods and classes deprecated to be removed in 3.0.
Bug Fixes Various fixes across the Form, Security, Routing, and other components.

What are the major new components added?

Symfony 2.8 ships with two brand-new, fully decoupled components. The Process component provides an object-oriented interface to execute system commands in sub-processes, handling things like timeouts and streaming output. The Ldap component offers a client for LDAP operations, which is especially useful for enterprise authentication scenarios.

Another significant addition is the LockHandler class, which creates file-based locks for ensuring a command or script only runs in a single process on a given server. This is a common need for cron jobs and background tasks.

How does the caching system improve?

This release introduces a PSR-6 bridge. The Symfony\Component\Cache\Adapter\Psr6Adapter class allows you to use any PSR-6 compliant caching library as a Doctrine Cache provider. In practice, this bridges the gap between Symfony's historical use of Doctrine Cache and the newer PSR-6 standard, offering more flexibility for cache backend choices.

Additionally, several new cache-related classes are added under the Symfony\Component\Cache namespace, laying the groundwork for a future, more robust caching component in Symfony 3.x.

What form-related changes should I know about?

The Form component gets a new @FormTheme annotation for controllers, letting you specify which form theme to use directly in the controller class. This is a cleaner alternative to calling $form->setTheme() in an action method.

New form themes are also included: bootstrap_3_layout.html.twig, bootstrap_3_horizontal_layout.html.twig, and foundation_5_layout.html.twig. These provide out-of-the-box integration with popular CSS frameworks, saving significant frontend integration time.

Are there new tools for debugging and development?

Yes, the DebugClassLoader is enhanced. It now reports when you try to autoload a class from a case-insensitive file system (like Windows or macOS) with the wrong case, which is a common source of "class not found" errors after moving code to a case-sensitive Linux production server.

The component also provides better deprecation warnings, helping you identify code that will break in Symfony 3.0. This is crucial for a smooth upgrade path from 2.x to 3.x.

What deprecations are introduced for Symfony 3.0?

Symfony 2.8 contains a massive list of deprecations. These are methods, classes, and services that will be removed in 3.0 but still work in 2.8 with a warning. Key areas include the OptionsResolverInterface being replaced by OptionsResolver, changes in the Process component's API, and deprecations in the Form, Validator, and Security components.

Running your application with the Symfony Profiler or using the debug:container and debug:router commands will highlight many of these issues. Addressing them in 2.8 is the recommended strategy before attempting an upgrade to 3.0.

FAQ

Is Symfony 2.8 a Long-Term Support (LTS) release?
Yes, Symfony 2.8 is an LTS release. This means it receives bug fixes for three years and security fixes for four years from its release date, making it a stable choice for long-term projects.

Why is the new Process component a big deal?
Before 2.8, you had to rely on PHP's basic proc_open or similar functions. The Process component wraps this functionality in a clean, object-oriented, testable, and more secure API, handling edge cases like timeouts, signal handling, and output streaming that are easy to get wrong manually.

How do the new form themes work with Bootstrap 3?
The new bootstrap_3_layout.html.twig and its horizontal counterpart provide form markup with the correct CSS classes for Bootstrap 3. You simply reference them in your form theme configuration, and your forms will automatically render with the proper Bootstrap structure and styling.

What should I do about the deprecation warnings?
You should not ignore them. Use the Symfony Profiler's "Deprecations" panel or run your tests with the SYMFONY_DEPRECATIONS_HELPER environment variable set to catch them. Updating your code to use the non-deprecated alternatives in 2.8 is essential for an easy upgrade to 3.0 later.

Can I use the new PSR-6 cache bridge with any PSR-6 library?
Yes, that's the point. The Psr6Adapter acts as an adapter. You instantiate it with any PSR-6 cache pool object (from a library like symfony/cache, php-cache, etc.), and it allows that pool to be used wherever a Doctrine Cache provider is expected within Symfony 2.8.

Releases In Branch 2.8 (LTS)

VersionRelease date
2.8.5213 Nov 2019
(6 years ago)
2.8.5017 Apr 2019
(7 years ago)
2.8.5117 Apr 2019
(7 years ago)
2.8.4906 Dec 2018
(7 years ago)
2.8.4826 Nov 2018
(7 years ago)
2.8.4703 Nov 2018
(7 years ago)
2.8.4630 Sep 2018
(7 years ago)
2.8.4527 Aug 2018
(7 years ago)
2.8.4401 Aug 2018
(8 years ago)
2.8.4323 Jul 2018
(8 years ago)
2.8.4225 Jun 2018
(8 years ago)
2.8.4125 May 2018
(8 years ago)
2.8.4021 May 2018
(8 years ago)
2.8.3930 Apr 2018
(8 years ago)
2.8.3806 Apr 2018
(8 years ago)
2.8.3702 Apr 2018
(8 years ago)
2.8.3605 Mar 2018
(8 years ago)
2.8.3501 Mar 2018
(8 years ago)
2.8.3429 Jan 2018
(8 years ago)
2.8.3305 Jan 2018
(8 years ago)
2.8.3204 Dec 2017
(8 years ago)
2.8.3116 Nov 2017
(8 years ago)
2.8.3013 Nov 2017
(8 years ago)
2.8.2910 Nov 2017
(8 years ago)
2.8.2805 Oct 2017
(8 years ago)
2.8.2728 Aug 2017
(8 years ago)
2.8.2601 Aug 2017
(9 years ago)
2.8.2517 Jul 2017
(9 years ago)
2.8.2405 Jul 2017
(9 years ago)
2.8.2304 Jul 2017
(9 years ago)
2.8.2207 Jun 2017
(9 years ago)
2.8.2129 May 2017
(9 years ago)
2.8.2001 May 2017
(9 years ago)
2.8.1904 Apr 2017
(9 years ago)
2.8.1805 Mar 2017
(9 years ago)
2.8.1706 Feb 2017
(9 years ago)
2.8.1612 Jan 2017
(9 years ago)
2.8.1513 Dec 2016
(9 years ago)
2.8.1420 Nov 2016
(9 years ago)
2.8.1326 Oct 2016
(9 years ago)
2.8.1203 Oct 2016
(9 years ago)
2.8.1106 Sep 2016
(9 years ago)
2.8.1002 Sep 2016
(9 years ago)
2.8.930 Jul 2016
(10 years ago)
2.8.830 Jun 2016
(10 years ago)
2.8.706 Jun 2016
(10 years ago)
2.8.609 May 2016
(10 years ago)
2.8.502 May 2016
(10 years ago)
2.8.427 Mar 2016
(10 years ago)
2.8.328 Feb 2016
(10 years ago)
2.8.214 Jan 2016
(10 years ago)
2.8.126 Dec 2015
(10 years ago)
2.8.030 Nov 2015
(10 years ago)
2.8.0-BETA116 Nov 2015
(10 years ago)