Symfony 6 Certification New exam with updated questions 100% online Show your expertise

Symfony 2.1.0 beta2 released

After just two weeks and 130+ commits from 50+ developers, here comes Symfony 2.1.0 beta2.

Here are the most interesting changes since beta1:

  • the current locale for the user is not stored anymore in the session as it should be in the each request anyway (this makes Symfony closer to HTTP and allows for more stateless applications);

  • Swiftmailer has been upgraded to its latest version (as the class autoloading is now handled by Composer directly, you must remove the custom configuration you have in your app/autoload.php file);

  • The auto_start setting has been deprecated; remove it from your configuration (the session is now always started on-demand);

  • The charset setting has been deprecated; remove it from your configuration (if you are not using UTF-8, create a getCharset() method in AppKernel);

Composer now installs stable versions of packages by default, so don't forget to switch the default stability to dev in your composer.json file:

"minimum-stability": "dev",

Before running composer install, upgrade it to its latest version:

composer.phar self-update

Then, if running composer install gives you some errors, don't hesitate to run again more than once, it should fix itself.

If you are using the Symfony Standard Edition, you can read the new UPGRADE file. It tells you everything about upgrading your 2.0 application based on the standard edition to 2.1.

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.


Great! Upating!
I updated my composer.json/composer.lock files, did composer.phar self-update and tried several times composer.phar update, I'm getting this error (twice, each time):

The charset setting is deprecated. Just remove it from your configuration file.
Ok, my bad: I removed charset from config.
Then it complained about auto_start, so I removed auto_start from session.
Now, it complains that "CSRF protection needs that sessions are enabled."

BTW, I'm upgrading from beta1
Updated! It just works, great :)
Updated from BETA1, got the same error "[LogicException] CSRF protection needs that sessions are enabled"
Amazing !!! *.*
@Massimiliano Arione just remove the line

auto_start: true

and leave

Great news about sessionless ! Can't wait to find some time to upgrade to 2.1 !
Awesome job~~~Fantastic!!!
Super !

Quels sont les fonctions/modules/bundles à surveiller dans le cadre de cette update majeur ?
Great. Thank you.
No git tag v2.1.0-BETA2 for this?

The "NEWS FROM THE BLOG" section below is not updated with the latest blog entries. Is it an bug?
Hi !

We use to have an action to switch interface langue with :

$this->container->get('session')->set('_locale', $locale);

So how should we do now with the request ?
We have to set the locale in every request ?

(note: we cannot add locale on every url)

Thanks a lot for your help

Hi to all... i will start an application with this DEV release ...(y)

i have a questions
"the current locale for the user is not stored anymore in the session como debe ser in the each request anyway (this makes Symfony closer to HTTP and allows for more stateless applications);"

how do you recommends, deal with this variable?
Never more it goto into the session?
The UPGRADE file ( describes how to get back the old behavior for the `_locale` attribute.
@Jens: This was indeed a bug that has been fixed now. Thanks.
I've just install symfony 2.1 and test to upgrada a project in 2.0

How can I report a bug or a changement of behaviour ? I think this blog is not the better way...

For instance, in 2.0 I developped a twig extention :
- class Xxx_Twig_Extensions_Pager extends \Twig_Extension
but with symfony 2.1 I've this error Xxx\YyyBundle\Twig\Extension\Xxx_Twig_Extensions_Pager' not found
I just renamed my class and file without underscore and it fix the bug. I don't know why and if it's a bug...

Perhap's I meet some others issues in my migration. If my contribution can help you, tell me how !
@Clotaire: You can create an issue on the Symfony Github repository to report any problem during the migration:

Comments are closed.

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