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.2.0
by Fabien Potencier – March 01, 2013 – 37 comments

It's a wrap! Symfony 2.2.0 is now available and this is the first Symfony2 release that was driven by our new release process. First and foremost, I want to sincerely thank the Symfony community (developers, authors, bloggers, speakers, ...) who helped us on this release; everybody did a wonderful job in implementing new features, writing documentation for them, and fixing, tweaking, enhancing our existing code base.

Numbers

What can I say about this new release? As planned, Symfony 2.2.0 took 6 months and is made of 711 pull requests containing 2,035 commits and submitted by 44 developers for the code (47,191 additions and 13,512 deletions); documentation enjoyed 1,312 commits by 41 authors (13,038 additions and 3,336 deletions).

2,035 commits on a 6 month period means that, on average, 11 commits were pushed every single day. 711 pull requests means 4 pull requests merged per day.

Features

Numbers are not that interesting when it comes to upgrading, so what about the new features and the major changes? I won't list them all as most of them were discussed on this blog during the last few months:

Symfony 2.2 also comes with two new components that were extracted from existing code:

Documentation

The documentation team has been hard at work and all the new features and changes are already documented in the official documentation. It also comes with some nice new cookbooks and chapters.

Upgrading

Upgrading from 2.1 to 2.2 should be relatively easy as reported by many developers on the mailing-lists and on Twitter.

The first step is to update your composer.json file and run composer.phar update:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/composer.json b/composer.json
index 8f905d7..c2d7588 100644
--- a/composer.json
+++ b/composer.json
@@ -6,18 +6,18 @@
     },
     "require": {
         "php": ">=5.3.3",
-        "symfony/symfony": "2.1.*",
-        "doctrine/orm": ">=2.2.3,<2.4-dev",
-        "doctrine/doctrine-bundle": "1.0.*",
+        "symfony/symfony": "2.2.*",
+        "doctrine/orm": "~2.2,>=2.2.3",
+        "doctrine/doctrine-bundle": "1.2.*",
         "twig/extensions": "1.0.*",
         "symfony/assetic-bundle": "2.1.*",
-        "symfony/swiftmailer-bundle": "2.1.*",
-        "symfony/monolog-bundle": "2.1.*",
-        "sensio/distribution-bundle": "2.1.*",
-        "sensio/framework-extra-bundle": "2.1.*",
-        "sensio/generator-bundle": "2.1.*",
-        "jms/security-extra-bundle": "1.2.*",
-        "jms/di-extra-bundle": "1.1.*"
+        "symfony/swiftmailer-bundle": "2.2.*",
+        "symfony/monolog-bundle": "2.2.*",
+        "sensio/distribution-bundle": "2.2.*",
+        "sensio/framework-extra-bundle": "2.2.*",
+        "sensio/generator-bundle": "2.2.*",
+        "jms/security-extra-bundle": "1.4.*",
+        "jms/di-extra-bundle": "1.3.*"
     },
     "scripts": {
         "post-install-cmd": [
@@ -36,9 +36,12 @@
     "config": {
         "bin-dir": "bin"
     },
-    "minimum-stability": "dev",
+    "minimum-stability": "alpha",
     "extra": {
         "symfony-app-dir": "app",
-        "symfony-web-dir": "web"
+        "symfony-web-dir": "web",
+        "branch-alias": {
+            "dev-master": "2.2-dev"
+        }
     }
 }

Then, read the UPGRADE document carefully and do whatever is explained there (you might also need to read the UPGRADE instructions for the Symfony Standard Edition).

Optionally, you can also make changes that will make your application more compatible with Symfony 3.0.

Installing

If you are starting a new project on Symfony 2.2, based on the full-stack framework, you have several options:

  • Create a new project via Composer (recommended):

    1
    $ php composer.phar create-project symfony/framework-standard-edition somewhere/ 2.2.0``
    
  • Download an archive for the Symfony Standard Edition;

If you are using some of the Symfony components in your new application, just use the 2.2.0 version or the 2.2 branch:

What's next?

So, what's next? According to our release process, Symfony 2.3 will be released at the end of May 2013 and it will be the first long term support release. That's also the version that is going to be used by Drupal 8 and Laravel 4 to name just a couple of Open-Source projects that rely on the Symfony Components.

Thank you for your continued support and happy Symfony!

Comments RSS

  • Piotr Karszny
    #1 Piotr Karszny said on the 2013/03/01 at 09:07
    Best Regards Fabien, huge amount of work and inventions you've made !!!!
  • Toni Uebernickel
    #2 Toni Uebernickel said on the 2013/03/01 at 09:13
    Great work, everyone - thanks!

    Two things;

    * "minimum-stability": "alpha", seriously?
    * The Github download link template refers to the BETA1 files.
  • Roland
    #3 Roland said on the 2013/03/01 at 09:17
    The requested package doctrine/doctrine-bundle 1.2.* could not be found.


    Why got this error?
  • Christophe Coevoet
    #4 Christophe Coevoet said on the 2013/03/01 at 09:29
    @Roland because doctrine-bundle 1.2 has not been released as stable yet (I will do it this evening). This is the reason for "minimum-stability": "alpha" currently.
  • Ruud Kamphuis
    #5 Ruud Kamphuis said on the 2013/03/01 at 09:33
    @Stof So 2.2.1 will be released tomorrow with a different minimum-stability flag?
  • Matthias Pigulla
    #6 Matthias Pigulla said on the 2013/03/01 at 09:34
    Congrats for releasing on time :-) and thanks to all involved!
  • Tobias Sjösten
    #7 Tobias Sjösten said on the 2013/03/01 at 09:41
    Great news!

    I just visited the download page, prepared to skim through it to find the Composer command for 2.2 but found it presented as the canonical release. This news article confirmed it. :)
  • Jeremy Benoist
    #8 Jeremy Benoist said on the 2013/03/01 at 09:46
    There is a typo in the Features part: "HttKernel" :-)
  • Erik Saunier
    #9 Erik Saunier said on the 2013/03/01 at 10:15
    Thank you for this promising new version!
  • Nicolás Moreira
    #10 Nicolás Moreira said on the 2013/03/01 at 10:54
    Amazing!! thanks for everything, best regards
  • Jan Heller
    #11 Jan Heller said on the 2013/03/01 at 11:19
    Really a great job! Looking forward to using the new features.
  • Florian Preusner
    #12 Florian Preusner said on the 2013/03/01 at 11:27
    Congratz!
  • Chris Sedlmayr
    #13 Chris Sedlmayr said on the 2013/03/01 at 11:28
    Well done everyone!
  • Skander MABROUK
    #14 Skander MABROUK said on the 2013/03/01 at 12:01
    I love this kind of news :D

    Thans all symfonysts
  • Romain Gautier
    #15 Romain Gautier said on the 2013/03/01 at 12:24
    Great work, everyone!
  • Vladislav Veselinov
    #16 Vladislav Veselinov said on the 2013/03/01 at 13:04
    Awesome! I already upgraded my project. Works like a charm. Thanks to the development team for all the amazing work that makes my life(and tons of there people's, too) as a developer better!
  • Wouter De Jong
    #17 Wouter De Jong said on the 2013/03/01 at 14:24
    Great job!

    Something many people won't know, so I tell them:

    Also new in Symfony2.2: generate:controller action in SensioGeneratorBundle! Read the docs for more information: http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_controller.html
  • Thomas Jacquin
    #18 Thomas Jacquin said on the 2013/03/01 at 14:56
    Great news!

    Merci Fabien!
  • Ala eddine khefifi
    #19 Ala eddine khefifi said on the 2013/03/01 at 19:36
    Good news and wonderful job everyone!
  • Yosvel Quintero Arguelles
    #20 Yosvel Quintero Arguelles said on the 2013/03/01 at 19:42
    Nice, Symfony 2.2 has been released! Congratulations to the team and also the whole community :)
  • Michael Klik
    #21 Michael Klik said on the 2013/03/01 at 20:40
    Great work everyone!
  • Dmitry Zadorozhny
    #22 Dmitry Zadorozhny said on the 2013/03/01 at 21:13
    Many thanks for this release. We were waiting since today and now we are ready to build a new project from a scratch using Symfony. You've made a day!
  • Luis Alberto Sánchez Saldaña
    #23 Luis Alberto Sánchez Saldaña said on the 2013/03/02 at 06:49
    Wonderfull Fabien and team!!!
  • Horacio Miguel Gómez
    #24 Horacio Miguel Gómez said on the 2013/03/02 at 13:06
    I've been playing around with synonymy and I have to say it's the best framework I've come across. Great news having version 2.2 released!
  • Loïc Vernet
    #25 Loïc Vernet said on the 2013/03/02 at 16:21
    Good job !!! :)
  • Luis Cordova
    #26 Luis Cordova said on the 2013/03/02 at 18:54
    now we are looking forward to version 2.3 excellent, I am sure a lot of us would want to pour a lot of effort for 2.3 since we will be using it for a long time
  • Mario Rezende
    #27 Mario Rezende said on the 2013/03/03 at 20:53
    Great work, congratulations to all
  • Dmitry Tsoy
    #28 Dmitry Tsoy said on the 2013/03/04 at 08:34
    tnx, Fabien.
  • Pierre-Henri Bourdeau
    #29 Pierre-Henri Bourdeau said on the 2013/03/04 at 09:29
    Thanks a lot to all the dev. That's a lot of work !
  • Nick Winfield
    #30 Nick Winfield said on the 2013/03/04 at 15:42
    Great news, thank you! Will be giving this a road-test as soon as I can!
  • Liviu Panainte
    #31 Liviu Panainte said on the 2013/03/04 at 16:31
    Brilliant - great work everyone!
  • Tobias Olry
    #32 Tobias Olry said on the 2013/03/06 at 09:20
    Why not use minimum-stability: 'alpha' and not 'stable'. You can require unstable packages with "@dev", "@alpha", ...?

    Would be much better to identify volatile packages and default stability of a stable release shouldn't be alpha imho. Or am I missing something?
  • Tobias Olry
    #33 Tobias Olry said on the 2013/03/06 at 09:22
    remove first "not" :-) -> Why use [...] alpha and not stable
  • Javier Martinez Fernandez
    #34 Javier Martinez Fernandez said on the 2013/03/06 at 17:46
    Thank you for all commoters!
    When "stable" for "minimum stability" will be available?
  • Art Hundiak
    #35 Art Hundiak said on the 2013/03/07 at 16:21
    Really should consider amending your release process to state that minimum-stability must be stable. In 2.1.0 - 2.1.3 it was set to dev which caused a number of issues. It was sort of slipped into 2.1.4. And now it looks like we may have the same issues in 2.2.x.

    It's great that you met the deadline but stable releases really should be stable.
  • Nikolay Ivlev
    #36 Nikolay Ivlev said on the 2013/03/11 at 08:39
    Awesome!
    Just in time. I upgraded my new project ))
    Thanks!
  • Parisa Shad
    #37 Parisa Shad said on the 2013/03/12 at 10:10
    that's perfect