Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Discover the SensioLabs Support

Access to the SensioLabs Competency Center for an exclusive and tailor-made support on Symfony
sensiolabs.com

Fabien Potencier
Symfony 2.1.0 beta2 released
by Fabien Potencier – July 09, 2012 – 20 comments

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.

Comments RSS

  • Albert Casademont
    #1 Albert Casademont said on the 2012/07/09 at 11:59
    Great! Upating!
  • Massimiliano Arione
    #2 Massimiliano Arione said on the 2012/07/09 at 12:04
    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):

    [RuntimeException]
    The charset setting is deprecated. Just remove it from your configuration file.
  • Massimiliano Arione
    #3 Massimiliano Arione said on the 2012/07/09 at 12:15
    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
  • Adel ELHAIBA
    #4 Adel ELHAIBA said on the 2012/07/09 at 12:32
    Great!!
  • Roger Wigger
    #5 Roger Wigger said on the 2012/07/09 at 13:39
    Updated! It just works, great :)
  • Marek Brieger
    #6 Marek Brieger said on the 2012/07/09 at 13:42
    Updated from BETA1, got the same error "[LogicException] CSRF protection needs that sessions are enabled"
  • Willy Tito Sucasaire
    #7 Willy Tito Sucasaire said on the 2012/07/09 at 16:59
    Amazing !!! *.*
  • Marek Brieger
    #8 Marek Brieger said on the 2012/07/09 at 19:02
    @Massimiliano Arione just remove the line

    auto_start: true

    and leave

    session:
  • Rémi Alvado
    #9 Rémi Alvado said on the 2012/07/09 at 19:54
    Great news about sessionless ! Can't wait to find some time to upgrade to 2.1 !
  • Ricky Lee
    #10 Ricky Lee said on the 2012/07/09 at 22:18
    Awesome job~~~Fantastic!!!
  • Sebastien MALOT
    #11 Sebastien MALOT said on the 2012/07/09 at 22:20
    Super !

    Quels sont les fonctions/modules/bundles à surveiller dans le cadre de cette update majeur ?
  • Peter Kokot
    #12 Peter Kokot said on the 2012/07/10 at 01:11
    Great. Thank you.
  • Joe Cai
    #13 Joe Cai said on the 2012/07/10 at 03:09
    No git tag v2.1.0-BETA2 for this?
  • Jens Averkamp
    #14 Jens Averkamp said on the 2012/07/10 at 09:46
    Great!

    The "NEWS FROM THE BLOG" section below is not updated with the latest blog entries. Is it an bug?
  • Nicolas Bastien
    #15 Nicolas Bastien said on the 2012/07/10 at 15:38
    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

    Nicolas
  • Roberto German Puentes Diaz
    #16 Roberto German Puentes Diaz said on the 2012/07/10 at 15:55
    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?
  • Fabien Potencier
    #17 Fabien Potencier said on the 2012/07/10 at 16:09
    The UPGRADE file (https://github.com/symfony/symfony/blob/master/UPGRADE-2.1.md) describes how to get back the old behavior for the `_locale` attribute.
  • Fabien Potencier
    #18 Fabien Potencier said on the 2012/07/11 at 14:36
    @Jens: This was indeed a bug that has been fixed now. Thanks.
  • Clotaire
    #19 Clotaire said on the 2012/07/13 at 10:49
    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 !
  • Fabien Potencier
    #20 Fabien Potencier said on the 2012/07/13 at 12:54
    @Clotaire: You can create an issue on the Symfony Github repository to report any problem during the migration: https://github.com/symfony/symfony/issues.