Symfony 3.1.0 has just been released. As always, backward compatibility means that you should be able to upgrade easily without changing anything in your code.
We've started to blog about the great new features that comes with 3.1 (more blog posts on their way), but here is a curated list of the most relevant ones:
New Components
- Cache: Symfony 3.1 comes with an implementation of the cache PSR (PSR-6). The new component is also automatically wired in FrameworkBundle and Symfony Standard Edition (nicolas-grekas) (17408)
- Inflector (move from the StringUtil class of PropertyAccess) (teohhanhui) (18260)
LDAP
The LDAP component was introduced in Symfony 3.0 but marked as being internal. For Symfony 3.1, the component has been reworked from the ground up and it is not marked as being internal anymore:
- Improving the LDAP component (csarrazi) (17560)
- Added the possibility to configure all available Ldap options for connection (csarrazi) (18725)
- Check whether an entry attribute exists (hiddewie) (18492)
- Added default service name for the Security component's Ldap providers (csarrazi) (18387)
- Add write support for the Ldap component (csarrazi) (17817)
YAML
The YAML component was one of the most active component during the 3.1 development phase with many improvements:
- introduced flags to customize the parser behavior (xabbuh) (17730)
- added support to dump non UTF-8 encoded strings as binary data (xabbuh) (18294)
- added option to dump multi line strings as scalar blocks (xabbuh) (17943)
- added option to dump objects as maps (xabbuh) (17728)
- added support for parsing the !!binary tag (xabbuh) (17863)
- added support to parse and dump DateTime objects (xabbuh) (17836)
- deprecated starting plain scalars with characters (xabbuh) (17809)
- added dumper flag for enabling exceptions on invalid type (xabbuh) (17743)
- allowed dump customization option with dumper flags (xabbuh) (17578)
- deprecated parsing the !!php/object tag (xabbuh) (17462)
Process
- implemented IteratorAggregate to stream output (nicolas-grekas) (18414)
- added InputStream to seamlessly feed running processes (nicolas-grekas) (18386)
- added support for Traversable input (nicolas-grekas) (18350)
- allowed a callback whenever the output is disabled (romainneutron) (17427)
Serializer
- integrated the PropertyInfo Component (recursive denormalization and hardening) (mihai-stancu, dunglas) (17660)
- made XmlEncoder load flags configurable (dunglas) (18036)
- added a normalizer that support JsonSerializable objects (mcfedr) (17603)
- added a MaxDepth option (dunglas) (17113)
- added a data: URI normalizer (dunglas) (16164)
- added a new DateTime normalizer (dunglas) (17411)
Web Profiler
- added forward and redirection detection in wdt (HeahDude) (17589)
- added more information in the security profiler (javiereguiluz) (17887)
- added status code to search form (oktapodia) (17125)
- added HTTP return code in the Ajax request list table (kucharovic) (17540)
Console
- allowed to register commands privately (Ener-Getick) (18101)
- added applicationTester support to test stdout and stderr (SpacePossum) (17255)
- added non-auto column width functionality (akeeman) (17761)
- added truncate method to FormatterHelper (mheki) (16652)
HttpKernel
- deprecated passing objects as URI attributes to the ESI and SSI renderers (jakzal) (17611)
- added the kernel.controller_arguments event (stof) (18440)
- added an ArgumentResolver with clean extension point (iltar, HeahDude) (18308)
Form
- optimized LazyChoiceList and DoctrineChoiceLoader (HeahDude) (18359)
- deprecated form types as services (HeahDude) (18356)
- deprecated the "choices_as_values" option of ChoiceType (nicolas-grekas) (16994)
Security
- use auth trust resolver to determine anonymous in ContextListener (WouterJ) (18211)
- added new TargetPathTrait to get/set the authentication "target_path" (weaverryan) (17714)
Miscellaneous
- added "disabled" mode to SYMFONY_DEPRECATIONS_HELPER (nicolas-grekas) (18232)
- added mock DNS functions to PhpUnitBridge (nicolas-grekas) (18181)
- deprecated absolute template paths (jakzal) (18034)
- added strict image validation (Koc) (17458)
- added calls support for debug:container (JhonnyL) (18416)
- improved debug:container command (voronkovich) (17726)
- added support for sending raw cookies in the response (jakzal) (18105)
- added Controller::json` method to make it easy to send json (mcfedr) (`17642)
- added a format option to the DateTime constraint (dosten) (17553)
- abstracted URI logic and added crawl images to DomCrawler (valeriangalliat) (17585)
- added version as service for assets (ewgRa) (17532)
- added flags to VarDumper to allow fine tuning of dump representations (nicolas-grekas) (17305)
- allowed to get all the mime types associated to a format in the Request (Ener-Getick) (17318)
You can read more about this new version by reading the Living on the Edge articles on this blog. Also read the UPGRADE guide for Symfony 3.1.
Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy. Read our upgrade documentation to learn more.
Want to check the integrity of this new version? Read my blog post about signing releases .
Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.
Thank you all, and congrats! :)
This is great, however if your using phpunit to run your tests you should wait before using this version https://github.com/symfony/symfony/issues/18903
Awesome! Symfony 2.8 to 3.1 upgrade time :)
great news!!
Awesome !
Thank ;)
good news everyone!
Wow! Perfect!
Cache Component!!! I was on way to implement my own. But I didn't, cuz lack of time. Cache cache cache, isn't cache cool xD
So 3.2 and 2.3 are crossing each other, one is starting, the other is leaving...
I didn't see any officiel announcement about the end of bug fix support for 2.3, the first LTS, should the next bugfix PRs be based on 2.7 now? Will the 2.3 certification be removed in the following days?