The first beta of Symfony 2.6 was released on Monday. As always, backward compatibility means that you should be able to upgrade easily without changing anything in your code. Anyway, read the UPGRADE from 2.5 to 2.6 guide to learn more about new ways of doing things and deprecated features that will be removed in 3.0.
What's new in Symfony 2.6
Symfony 2.6 comes with more than 100 new features and enhancements. The full changelog from 2.5 to 2.6 BETA 1 is available on the repository, but here is a curated list of the most relevant ones:
Debugging improvements
- new VarDumper Component and DebugBundle (jpauli, nicolas-grekas, ruian, moux2003, tony-co, romainneutron, oscherler, lyrixx) (10640)
- error handler in production (nicolas-grekas) (12081)
- generic ErrorHandler (nicolas-grekas) (10921)
- added an action to show error pages in kernel.debug mode (mpdude) (12096)
- enhanced error messages for uncaught exceptions (nicolas-grekas) (11034)
- container:debug: list services if no service match exactly the name argument (agallou) (11339)
- added link to the output of debug function (lyrixx) (12036)
- improved debug:event-dispatcher (matthieuauger) (10388)
- removed the scope from the output of the container:debug command (xabbuh) (11317)
- added some file link format handling (nicolas-grekas) (12045)
Form improvements
- Twitter Bootstrap form theme (lyrixx) (10272)
- trace of form errors in the profiler (webmozart) (12054)
- added "label_format" option (webmozart) (12050)
- added Doctrine entity manager instance support for em option (egeloen) (12251)
- choice children can be template customized like collection (adrienbrault) (9033)
- add allow_html5 option to date and time FormType to disable HTML5 input type (csanquer) (8291)
- improve transformation failure message by providing property path (jubianchi) (11318)
- add allow_extra_fields option on forms (felds) (8133)
Validation improvements
- added date support to comparison constraints and Range (webmozart) (11673)
- expression validator now processes null values (tommygnr) (11709)
- added error codes to all constraints with multiple error causes (webmozart) (12021)
- made it possible to store the cause of a constraint violation (webmozart) (12052)
- added "payload" option to all constraints for attaching domain-specific data (webmozart) (12005)
- added ConstraintViolation::getConstraint() (webmozart) (11657)
- support "maxSize" given in KiB (Jérémy Derussé) (11027)
- disallowed empty file in FileValidator (megazoll) (11125)
Better extensibility/reusability improvements
- Expression language extensibility (fabpot) (12006)
- moved cache to Translation component (11373) (aitboudad, OwlyCode)
- made it possible to override the default success/failure handler (fabpot) (11993)
- allowed overloading ContextListener::refreshUser() (lstrojny) (10792)
- extracted method to instantiate controller in ControllerResolver (danharper) (12022)
- split of the SecurityContext (iltar) (11690)
Enhancements of existing features
- handled circular references in the Serializer (dunglas) (12098)
- made the stopwatch service always available (xabbuh) (11549)
- exposed configuration of PropertyAccess (lyrixx) (11731)
- added support for slicing nodes in Dom Crawler (Berat Doğan, beratdogan) (10699)
- added compare method to CSS selector specificity (barryvdh) (11404)
- added retrieval of Timer sections (umpirsky) (10851)
- MongoDbSessionHandler supports auto expiry via configurable expiry_field (catchamonkey) (11668)
- ResponseHeaderBag::clearCookie now accepts secure/httpOnly (adrienbrault) (11173)
- added a switch to delete file after the response is send (WybrenKoelmans) (11212)
- add support for streams as Process input (romainneutron) (10934)
- added support for object-maps in YAML (polyfractal, nicolas-grekas) (10552)
- added a way to match a specific scheme in RequestMatcher #10556 (ProPheT777) (10667)
- enhanced PdoSessionHandler (Tobion) (10931)
- added ParameterBag::getBoolean (peterjmit) (11086)
- throw Exception on copying from an unreadable file or to an unwritable file (djotto) (10960)
- added support for encoding and decoding namespaced xml (xmlns) (11375) (mattvick)
- added support for skipping commands from ConsoleCommandEvent (tPl0ch) (9235)
- added some methods to improve the handling of auto_mapping feature (goetas) (11815)
- provide a compiler pass for doctrine to register namespace aliases (dbu) (10853)
Translation improvements
- added LoggingTranslator (aitboudad) (10887)
- moved cache to Translation component (11373) (aitboudad, OwlyCode)
- enabled translation:update for app folder (rdohms) (11254)
- added target-language (aitboudad, ClementGautier) (11371)
- added support for (Jérémy Derussé) (10939)
- added method to expose collected message (Grygir) (9859)
DX improvements
- added shortcut methods to controllers (Cydonia7) (11593)
- added error helpers (i3or1s) (11324)
- added a new service to simplify password encoding (aferrandini) (11306)
- added an AbstractVoter implementation (Inoryy) (11183)
- made assets:install smarter with symlinks (Roy Van Ginneken) (11312)
- made assets-install --relative equivalent to --symlink --relative (fabpot) (12123)
- added a new syntax to define DI factories as callables (realityking, fabpot) (12008)
- added additional helper commands to control PHP's built-in web server (xabbuh) (11311)
- ProgressBar developer experience (stefanosala, gido) (11346)
- added Controller::isCsrfTokenValid (lyrixx) (11602)
- added simple placeholders into search form (stloyd) (10660)
- made return value similar to error.json.twig (clemens-tolboom) (11078)
- added value of DateTime object to ValueExporter (scuben) (11070)
Various new features
- AJAX requests in the symfony profiler toolbar (Burgov, fabpot, stof) (12000)
- SSI support (KingCrunch) (10702)
- added a Process helper (fabpot, romainneutron) (10627)
- PropertyNormalizer: a new normalizer that maps an object's properties to an array (mnapoli) (9708)
- added a REMOTE_USER based listener to security firewalls (Maxime Douailin) (10698)
- added a LockHandler (lyrixx) (10475)
- ensured whole number floats have their data type is persisted. (Alex Pott) (11976)
- added acl:set command (dunglas) (9990)
Testing 2.6
You can test, hack, and play with Symfony 2.6 code in many different ways:
- Create a new project via Composer (recommended):
1
$ php composer.phar create-project symfony/framework-standard-edition somewhere/ 2.6.0-BETA1
- Download the whole framework or the Standard Edition via GitHub
- Download individual components via Github:
https://github.com/symfony/{COMPONENT_NAME}/archive/v2.6.0-BETA1.zip
This is really great list of changes! It gave me nice overview of all the work that contributors did. Good job! Thanks for that.