New in Symfony 2.3: Small things matter

Every new Symfony release tries to brings some small but useful improvements. Let's dive into some of them for Symfony 2.3 (in no particular order).

In #6950, Emanuele Gaspari tweaked the output of the router:match command to display the route information if there is a match. That should help you understand why this specific route matched.

When a customer stumbles upon an exception when testing your shiny new Symfony application, you might want to get the stack trace to investigate the issue further. You can use the web profiler, but you can now also ask him to copy and paste the stack trace from the web page as there is now a plain text version of it thanks to the work of Igor Wiedler in #6613.

In #6815, Javier López added a default configuration for the Serializer component in the Service Container. Read the dedicated cookbook to learn how you can customize it.

Since 2.2, you can use the PHP built-in webserver on your development machine (but it was limited to the development environment). But what if you want to test your production error pages? Thanks to Dariusz Górecki did in #7507, you can now run the built-in server in any environment (php app/console --env=prod server:run).

When using a form to login your users, you might want to start the session as late as possible. Adrien Brault added a configuration setting (require_previous_session) to better control if a session must exist before submitting an authentication request (see #4776 and the setting in the docs).

Since 2.2, you need to manually enable support for the _method request parameter. Thanks to Toni Uebernickel in #7202, you can now control this feature with the http_method_override setting.

In #6550, Eric GELOEN made debugging configuration parameters a lot easier; use php app/console container:debug --parameters to list all parameters and php app/console container:debug --parameter=kernel.debug to display the value of a specific parameter. This can also be useful if you need a parameter value in a bash script ($CACHE_DIR="`php app/console container:debug --parameter=kernel.cache_dir`/foo").

Internally, Symfony converts short controller names (FooBundle:Home:index) to a controller/action pair that PHP understands. In #7843, Bart van den Burg, added a way to do the reverse: transform a controller::action string to its short name notation ($container->get('controller_name_converter')->build('Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'); would return FrameworkBundle:Redirect:redirect).

If, like Henrik Bjørnskov, you have a retina display, #7065 brings retina canvas elements to the web profiler.

The Sensio Generator Bundle speeds up bootstrapping Doctrine entities, CRUD controllers, Form types, and more. But what if you want to customize the generated code? Thanks to the work of NinjDS, Luis Muñoz Hernández, and Fabien Potencier, you can now override each generated block quite easily. Reading the documentation should get you started in no time.

Romain Neutron has been very busy with the Process component and he contributed several enhancements: signals support and pid support in #5476, and proper timeout support in #7583. Ever wanted to run commands that need a TTY to run properly? Máximo Cuadros got you covered in #7566.

Sometimes, you need to mix a Symfony application with another PHP application within a single project. Sharing sessions is a nightmare, but Karma Dordrak, in #7571, added a way to manage a session started outside of Symfony (he even wrote a whole chapter in the documentation about it).

Ever wondered if using the PATCH HTTP method would work with a Symfony form? Bernhard Schussek made it possible in #7849.

This is Friday... Lucky you, Symfony 2.3.0 RC1 has just been released and the week-end is just around the corner. So, what about testing some of these new features?


Thanks for the release.
Props to Fabien for mentioning the developers!
Posts like this make it easy to convince my boss to keep choosing Symfony2.
Very useful overview of changes in one place. Thanks everyone for making this possible. Amazing.
nice, useful release.
Good work everyone!
Excellent write-up.
Awesome enhancements and changes, looks clear on the Doc too, Great job everyone
Cool features, I tested a lot of them on a fresh project. Excellent work.
good work :)
is there a symfony 3 version coming ? oO

How can I update my project to this version ?

good work

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.