2.8.52

Latest release in branch 2.8
Released 6 years ago (November 13, 2019)

Software Symfony
Branch 2.8
Status LTS
End of life
End of bug fixes November 2018
End of security fixes November 2019
First official release version 2.8.0
First official release date 10 years ago (November 30, 2015)
Supported
PHP versions
PHP ≥ 5.3.9
Release notes https://github.com/symfony/symfony/releases/tag/v2.8.52
Source code https://github.com/symfony/symfony/tree/v2.8.52
Documentation https://symfony.com/doc/current/index.html
Download https://symfony.com/download
Symfony 2.8 Releases View 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

Version Release date
2.8.52 6 years ago
(November 13, 2019)
2.8.50 7 years ago
(April 17, 2019)
2.8.51 7 years ago
(April 17, 2019)
2.8.49 7 years ago
(December 06, 2018)
2.8.48 7 years ago
(November 26, 2018)
2.8.47 7 years ago
(November 03, 2018)
2.8.46 7 years ago
(September 30, 2018)
2.8.45 7 years ago
(August 27, 2018)
2.8.44 7 years ago
(August 01, 2018)
2.8.43 7 years ago
(July 23, 2018)
2.8.42 7 years ago
(June 25, 2018)
2.8.41 7 years ago
(May 25, 2018)
2.8.40 7 years ago
(May 21, 2018)
2.8.39 7 years ago
(April 30, 2018)
2.8.38 8 years ago
(April 06, 2018)
2.8.37 8 years ago
(April 02, 2018)
2.8.36 8 years ago
(March 05, 2018)
2.8.35 8 years ago
(March 01, 2018)
2.8.34 8 years ago
(January 29, 2018)
2.8.33 8 years ago
(January 05, 2018)
2.8.32 8 years ago
(December 04, 2017)
2.8.31 8 years ago
(November 16, 2017)
2.8.30 8 years ago
(November 13, 2017)
2.8.29 8 years ago
(November 10, 2017)
2.8.28 8 years ago
(October 05, 2017)
2.8.27 8 years ago
(August 28, 2017)
2.8.26 8 years ago
(August 01, 2017)
2.8.25 8 years ago
(July 17, 2017)
2.8.24 8 years ago
(July 05, 2017)
2.8.23 8 years ago
(July 04, 2017)
2.8.22 8 years ago
(June 07, 2017)
2.8.21 8 years ago
(May 29, 2017)
2.8.20 8 years ago
(May 01, 2017)
2.8.19 9 years ago
(April 04, 2017)
2.8.18 9 years ago
(March 05, 2017)
2.8.17 9 years ago
(February 06, 2017)
2.8.16 9 years ago
(January 12, 2017)
2.8.15 9 years ago
(December 13, 2016)
2.8.14 9 years ago
(November 20, 2016)
2.8.13 9 years ago
(October 26, 2016)
2.8.12 9 years ago
(October 03, 2016)
2.8.11 9 years ago
(September 06, 2016)
2.8.10 9 years ago
(September 02, 2016)
2.8.9 9 years ago
(July 30, 2016)
2.8.8 9 years ago
(June 30, 2016)
2.8.7 9 years ago
(June 06, 2016)
2.8.6 9 years ago
(May 09, 2016)
2.8.5 9 years ago
(May 02, 2016)
2.8.4 10 years ago
(March 27, 2016)
2.8.3 10 years ago
(February 28, 2016)
2.8.2 10 years ago
(January 14, 2016)
2.8.1 10 years ago
(December 26, 2015)
2.8.0 10 years ago
(November 30, 2015)
2.8.0-BETA1 10 years ago
(November 16, 2015)