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
Upgrading to symfony 1.4
by Fabien Potencier – November 27, 2009 – 3 comments

As explained in the documentation, the symfony 1.4 version has the exact same feature set as symfony 1.3. The only difference between the two versions is how each supports backward compatibility with older symfony versions.

If you have a relatively "old" symfony project, odds are you started with symfony 1.0, and you have probably upgraded to symfony 1.1, then 1.2, and now 1.3.

Upgrading from symfony 1.3 to symfony 1.4 means that you must be sure that your project does not use any deprecated feature. The DEPRECATED tutorial gives you all the information you need to know, but it can be a bit boring to check everything by hand.

I have just added a new project:validate task to symfony 1.3 and 1.4 to help you figure out what you need to change for your project to work under symfony 1.4 smoothly.

The task lists all the files you need to change before switching to symfony 1.4. Be aware that this task is a just "glorified regular expression" and as such, it might give you many false positives. Also, it cannot detect everything, so it is just a tool that helps you identifying possible problems, not a magic tool. You still need to read the DEPRECATED tutorial carefully.

Try the new task on your projects today, and see how much work you still need to do to be able to upgrade your projects to symfony 1.4.

Comments RSS

  • gravatar
    #1 Sacri said on the 2009/11/27 at 18:17
    Thanks for this task !
    I've done a php script that loop rgrep all the deprecated stuff in my projects but I prefer your idea :)
  • gravatar
    #2 Massimiliano Arione said on the 2009/11/28 at 16:08
    I found a false positive that you can likely avoid: in funcional test files, the ":contains" pseudo-selector is detected instead of deprecated method "contains()".
  • gravatar
    #3 Fabien said on the 2009/11/28 at 17:24
    @Massimiliano: I have changed the regex to avoid this false positive. Thanks for the report.