Archives


Master Symfony2 fundamentals

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

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

Discover the SensioLabs Support

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

gravatar
Symfony 1.1 Beta 2 released - What's new?
by Francois Zaninotto – March 25, 2008 – 38 comments

We've just released a new beta version of symfony 1.1. This is the first true beta release, meaning that the API of the new features is not subject to change. It should put a stop to the addition of major functionality and internal refactoring. The next weeks will focus on testing, debugging and documenting the framework, with a target stable release in a month or two from now.

For those who didn't follow the timeline of 1.1 developments, here is a quick overview of the additions and improvements this new version offers over symfony 1.0:

  • New Command Line Utility

    • Completely rewritten from scratch (bye, pake!)
    • Now based on an Object-Oriented subframework
    • Allows for unordered named options
    • Tasks are extensible
    • Built-in help (php symfony help [taskname])
    • Reliable, easy to use and intuitive
  • New form subframework

    • Forms are now classes
    • Form Widgets represent the view layer. The subframework provides more widgets than symfony 1.0 had form helpers.
    • Native and easy handling of validation, fillin, request binding
    • Native CSRF protection
    • Native file upload validation
    • Support for nested validations and widgets
    • The Most Beautiful Form Framework You've Ever Seen In PHP - and you can even use it outside of symfony!
    • Optional (your old forms still work!)
  • New plugin manager

    • Completely rewritten from scratch
    • Supports dependencies between plugins
    • New options for more control over what you install (--install_deps, --release, --stability)
    • Support for the REST API of a PEAR channel
 
  • Improved ORM integration

    • Propel has been updated, and is now a plugin, bundled by default with symfony 1.1
    • Behaviors can now be declared directly in the schema
    • A schema can be overridden by another one
    • New configure:database task to update both the propel.ini and databases.yml dsn from the command line
    • More hooks in the code - that means more opportunities for extensions and behaviors
    • Better i18n support ($article->getTitle('fr'))
    • Improved dump/load, dealing with FK seamlessly
    • YAML schema generated from a database is now more readable
    • Support for the new Form subframework
 
  • Improved Routing

    • The routing now has a cache layer: That's a massive boost for pages with a lot of URLs to generate
    • Token separator in routes is no more limited to '/'. You can now use any characters, for instance to allow routes like /article/:title.:format
    • PJS and multiformat are on the way
    • The routing class is not a singleton anymore - that means that an application can have access to another application's routing objects
  • Improved internationalization

    • I18n now uses the same caching techniques as the view, for faster-than-ever template generation
    • A new task can find untranslated text strings in templates and add them to the dictionaries (symfony i18n:extract)
    • Another new task can find text strings without __() in templates and report them (symfony i18n:find)
    • XLIFF and gettext dictionaries can now be in multiple directories
    • The I18n class is not a singleton anymore
 
  • Improved caching

    • New caching factories, allowing to use Memcached or APC as caching storage
    • Ability to remove the cache from another application
    • The view cache manager now accepts wildcards in the remove() calls, whatever the caching factory you use
    • Partials and components in cache can now add JavaScripts and stylesheets in the main response
    • New general caching factory, for your non view-related caching needs
    • The function cache can now use any caching factory (not only sfFileCache)
 
  • Improved configuration

    • The Spyc parser was dumped, in favor of a brand new, home-made, more robust YAML parser
    • Incorrect YAML files now throw a helpful error message
    • Symfony can auto-check that it can run (check_configuration.php checks PHP version, extensions, etc.)
    • The project and application configurations are now classes, offering convenient methods to customize the project directory structure and loaders
    • An application can access another application's configuration
  • Improved Tests

    • A performance tool allows to measure the speed difference between each version of symfony - objectively
    • CSS3 selectors are now supported in the sfDomCSSSelector (:contains(), :first, etc.)
  • A gazillion little improvements that will make your life easier

    • Actions can now end by renderPartial() or renderComponent()
    • sfWebRequest now has an isMethod() method (if($request->isMethod('post')))
    • Support for many-to-many relationships in fixtures
    • Ability to execute an action on a selection of entries in the admin generator
    • More information in the Web Debug Toolbar (PHP extensions, sfUser attributes, etc.)
    • Improved error messages in Phing
 

Overall, that's not too many new features for more than a year in development. But the real beauty is in the inside. Symfony 1.1 is a major step in code extensibility. The decoupling of classes has touched every part of the framework. A large part of the job turns around a new event manager inspired by Cocoa. Also, almost every key feature of the framework is now controlled by a factory, so you can hack symfony into doing whatever you like. Not to mention that the code is more beautiful than ever - for those who can see beauty in code...

And to finish with a more general view of the code, the number of unit tests has been doubled (from 4,000 to more than 8,000). And all the bugfixes in symfony 1.0 were backported to symfony 1.1. That means that symfony is more robust than ever, and that you can use it for all your web application projects with your eyes closed.

So now you may ask: "What's the tradeoff?" You probably expect migration problems and expensive upgrade for your applications. Be reassured: Symfony 1.1 is backward compatible with symfony 1.0. That means that:

  • 98% of your application code will work without modification
  • 1.9% of your application code will be changed automatically by the upgrade 1.1 task
  • 0.1% of your application code will have to be changed by hand, and the upgrade 1.1 task will tell you where and how to do it

If you want to give it a try, go ahead and download symfony 1.1:

  • Download a 1.1 sandbox
  • Or do a Subversion checkout: svn co http://svn.symfony-project.com/tags/RELEASE_1_1_0_BETA2 .
  • Or install the PEAR package: pear install symfony/symfony-beta

Don't forget to read the UPGRADE file - this is really important.

We will soon announce the next symfony Sprint, a day where all the community gathers to add documentation, write tests, fix bugs, and fill the gaps. And this time, the Sprint will also be an occasion to upgrade your application to symfony 1.1, with free online support from Sensio for the whole day. Keep your eyes open for upcoming news!

Comments RSS

  • gravatar
    #1 Mickael said on the 2008/03/25 at 19:41
    That's the best news since symfony 1.0 ;)
  • gravatar
    #2 ruzz said on the 2008/03/26 at 06:41
    been waiting for a stable beta.. excellent work to the whole team :)
  • gravatar
    #3 Muhammad Asif ali said on the 2008/03/26 at 06:43
    Great news to all symfony developers. I am eager to play with the new features but afraid to upgrade the development server which contains many symfony 1.0 projects. :-)
  • gravatar
    #4 Lukasz Wojciechowski said on the 2008/03/26 at 06:43
    Great news


    Keep up the good work - symfony rocks
  • gravatar
    #5 Jacques Philip said on the 2008/03/26 at 08:20
    Nice, than you; Is the sfDoctrine plugin already fully compatible orr will this come later?
  • gravatar
    #6 b00giZm said on the 2008/03/26 at 08:28
    Great job guys!!!

    Symfony just kicks ass.

    The new features sound awesome. I can't wait to get my hands on the new version.
    Are there already any detailed docs available? Maybe I'm just too blind but i couldn't figure out the differences between the 1.0 and 1.1 online documentation ;)
  • gravatar
    #7 phuson said on the 2008/03/26 at 08:46
    Looking forward to 1.1!
  • gravatar
    #8 muxx said on the 2008/03/26 at 09:31
    Francois, it's really wonderful! Only one question, what gives with symfony performence time?
  • gravatar
    #9 jarod51 said on the 2008/03/26 at 09:59
    François for president !!!
  • gravatar
    #10 Jerome said on the 2008/03/26 at 10:00
    Sounds great...

    but it seems admin generator is still 1.0-based. Is it planned to be rewritten usgin 1.1 version ?

    If not, it will be hard to maintain an application written 2 different standards...

    Hope Symfony team will answer this.
  • gravatar
    #11 Jerome said on the 2008/03/26 at 10:00
    Sounds great...

    but it seems admin generator is still 1.0-based. Is it planned to be rewritten usgin 1.1 version ?

    If not, it will be hard to maintain an application written 2 different standards...

    Hope Symfony team will answer this.
  • gravatar
    #12 Jordi said on the 2008/03/26 at 10:23
    I am a happy man ...
  • gravatar
    #13 gasper_k said on the 2008/03/26 at 10:47
    Congratulations! :)
  • gravatar
    #14 z01d said on the 2008/03/26 at 11:17
    Thank you!
  • gravatar
    #15 Vitaille said on the 2008/03/26 at 11:53
    Great Job...!!

    So many feature and changes...

    Why didn't you call it Symfony 2.0 ???
  • gravatar
    #16 Hugo said on the 2008/03/26 at 13:12
    Good job guys ;)

    I hope I could use this new Symfony version for my new projects :D

    PHP and Symfony rocks !
  • gravatar
    #17 Jeff said on the 2008/03/26 at 13:52
    wow it's amazing...

    Great news for all symfony developers.. Symfony rocks !
  • gravatar
    #18 Celso said on the 2008/03/26 at 15:09
    excellent!!
  • gravatar
    #19 hartym said on the 2008/03/26 at 15:19
    great i hope this will be stable soon ^^
  • gravatar
    #20 Joan Piedra said on the 2008/03/26 at 20:13
    These are great news, thanks for all the devoted work on this awesome framework.

    A quick question, is it possible to use dashes, underlines, or commas in this new routing system?
  • gravatar
    #21 Dejan Spasic said on the 2008/03/26 at 20:16
    Just breathtaking.

    Thank you!
  • gravatar
    #22 Skyblaze said on the 2008/03/26 at 21:59
    Is it updated also the crud code generation? I mean the 1.0 version creates action code and template code using object form helpers that in 1.1 are deprecated in favor to the new form system
  • gravatar
    #23 Marek said on the 2008/03/26 at 22:25
    Is pear install working for anyone?

    $ pear remote-list -c symfony
    Channel symfony Available packages:
    ===================================
    Package Version
    pake 1.1.4
    sfEzpdo -n/a-
    symfony 1.0.12

    $ pear install symfony/symfony
    Ignoring installed package symfony/symfony
    Nothing to install

    (after channel-update)
  • gravatar
    #24 Laurynas Malisauskas said on the 2008/03/27 at 09:49
    i hope the upcoming sprint will concentrate on documentation the most, in order to make possible for not so experienced users to upgrade from 1.0.x to 1.1
  • gravatar
    #25 Christopher Brunsdon said on the 2008/03/27 at 10:10
    Thanks guys. Just did my PEAR upgrade and it has come in. :-)
  • gravatar
    #26 halfer said on the 2008/03/27 at 15:42
    Lovely, thanks chaps. I shall use the beta for a subsection of my new project, and I dare say if it all goes to plan, the rest will be converted to 1.1 too!
  • gravatar
    #27 Sergey said on the 2008/03/29 at 09:10
    Some problem for my - downloaded sandbox, created schema.yml, do propel-build-all, then propel-insert-sql and propel-generate-crud. Everything created and available. But then i try to create record from crud interface, error message appeared - csrf token: Required.

    what can i do?
  • gravatar
    #28 Gnagno said on the 2008/03/29 at 17:48
    congratulations for the great work!!!

    Is there any page documenting how to use the new features?
  • gravatar
    #29 Dharmavirsinh Jhala said on the 2008/03/29 at 19:45
    Bingo..!
    I have been waiting for this release since long. Many congratulations to Symfony Team.
    http://blogs.digitss.com/
  • gravatar
    #30 mad said on the 2008/03/29 at 21:28
    any new things in the admin generator?
  • gravatar
    #31 Christian Schaefer said on the 2008/03/30 at 18:39
    Thanks so much guys! I've been working with 1.1-DEV for a good three months now following closely how it evolves and I love it! An extraordinary minor release this is! Brilliant work! Cheers
  • gravatar
    #32 JEANTET Valere said on the 2008/03/31 at 17:25
    good job !
  • gravatar
    #33 vinilios said on the 2008/04/01 at 12:28
    Looks amazing, keep it up ppl !!!
  • gravatar
    #34 john said on the 2008/04/06 at 19:23
    Pear doesn't appear to have the beta version:

    mini:~ john$ pear remote-list -c symfony
    Channel symfony Available packages:
    ===================================
    Package Version
    pake 1.1.4
    sfEzpdo -n/a-
    symfony 1.0.13
    mini:~

    mini:~ john$ sudo pear install symfony/symfony-beta
    downloading symfony-1.0.13.tgz ...
    Starting to download symfony-1.0.13.tgz (1,914,365 bytes)
    ....
    install ok: channel://pear.symfony-project.com/symfony-1.0.13
    mini:~ john$ sudo pear upgrade symfony/symfony-beta
    Nothing to upgrade
    mini:~
  • gravatar
    #35 john said on the 2008/04/06 at 19:40
    Ah, Fabien addresses the symfony-beta problem here in comment #2: http://www.symfony-project.org/blog/2008/04/01/symfony-1-0-13-is-out

    mini:~ john$ sudo pear install symfony/symfony-1.1.0beta2
    downloading symfony-1.1.0beta2.tgz ...
    Starting to download symfony-1.1.0beta2.tgz (2,057,855 bytes)
    ....
    install ok: channel://pear.symfony-project.com/symfony-1.1.0beta2
    mini:~ john$ symfony --version
    symfony version 1.1.0-BETA2 (/opt/local/lib/php/symfony)
    mini:~
  • gravatar
    #36 Justin said on the 2008/04/22 at 19:59
    FYI, if it helps someone else:

    I installed 1.0 first. When I tried to install the 1.1 beta, it did this:

    $ pear install symfony/symfony-beta
    Ignoring installed package symfony/symfony
    Nothing to install

    So I ran the uninstall of the non-beta, and then that worked. So if you get that error, and want to have 1.1 instead of 1.0, try this:

    pear uninstall symfony/symfony

    then try to install the beta as per instrucitons.
  • gravatar
    #37 Justin said on the 2008/04/22 at 20:00
    FYI, if it helps someone else:

    I installed 1.0 first. When I tried to install the 1.1 beta, it did this:

    $ pear install symfony/symfony-beta
    Ignoring installed package symfony/symfony
    Nothing to install

    So I ran the uninstall of the non-beta, and then that worked. So if you get that error, and want to have 1.1 instead of 1.0, try this:

    pear uninstall symfony/symfony

    then try to install the beta as per instructions.
  • gravatar
    #38 vv said on the 2008/05/13 at 07:36
    How do you upgrade it?
    I'm running 1.1beta4

    c:\php>pear upgrade symfony/symfony-beta
    Nothing to upgrade