Search code examples
phpsymfony1

How to run multiple versions of Symfony PHP Framework


I have several web projects built with Symfony v1.0, but I am excited by the new features in Symfony version 1.4 (Improved security, native email support and improved performance).

How can I continue to develop my 1.0 projects but also create a testing environment for version 1.4?


Solution

  • Guide to Installing Multiple versions of Symfony

    Thankyou to Guillaume Flandre for pointing it out, there is a fantastic article written by eHabib on SymfonyNerds.com - http://symfonynerds.com/blog/?p=123

    Here is the basic outline, read the whole article here.

    Step 1 - Un-install Symfony via PEAR

    Step 2 - Setup a structure for Symfony: Install symfony in /usr/share/php/symfony

    Step 3 - Checkout each Symfony version you need

    Use SVN checkout to grab each Symfony version. Put these in a different folder under the base Symfony directory.

    Step 4 - Create symbolic links for each version

    Create and test symlinks for each version of Symfony. Lets place these in the standard bin directory

    Step 5 - Creating a new project

    Use the relevant Symfony command. For example, to create a Symfony 1.0 project:

    • sudo symfony10 init-project test1
    • sudo symfony11 generate:project test11
    • sudo symfony12 generate:project test12

    Step 6 - Check in the project Config to ensure its picked up the right version.