Living on the Edge
A series of posts showcasing the new features introduced by each Symfony version.
This article is the last one in the "New in Symfony 2.8" series. It explains five minor but useful improvements introduced in several Symfony components.
Symfony 2.8 introduces twelve small and decoupled polyfill components to "fill the gaps" of PHP 5.x versions and missing extensions. Now your applications can safely use PHP features and functions available in any PHP version.
In Symfony 2.8 we decided to simplify the DependencyInjection component by removing the concept of "scopes" and introducing the "shared" configuration option.
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable and a replacement for PHP's var_dump(). Symfony 2.8 added new casters to VarDumper, which are responsible to format the dumped information accordingly to their types.
Symfony 2.8 added new features to Dependency Injection, such as service decoration priorities, resetteable containers, logging of unused tags and simpler compiler pass registration.
Symfony 2.8 added support for XLIFF 2.0, for dumping translation contents without writing them in a file and for configuring the paths where translation files should be loaded from.
The upcoming Symfony 3.1 version will introduce lots of new and useful features for the Yaml component. But before enjoying those features, in Symfony 2.8 we needed to deprecate some features to make Yaml files comply with the Yaml specification.
Symfony 2.8 includes a ClockMock class to avoid transient tests because of time-related errors and to make your tests faster.
Security Voters are the recommended way to check for user permissions in Symfony applications In Symfony 2.6 we introduced an AbstractVoter class to reduce the boilerplate code needed to define a voter. In Symfony 2.8 we have simplified voters a bit more thanks to the new Voter class.
DX or Developer Experience is essential for Symfony project. We work very hard to improve DX in each Symfony release and the recent Symfony 2.8 version is no exception.
- « Previous Page
- Next Page »