Friday, May 7, 2010

Symfony: Multiple Version in same environment

Your Complete Guide to Running Multiple
Symfony Versions on the Same Environment
http://symfonynerds.com/blog/?p=123

Step 1 Uninstall any existing symfony installations
[root]# pear uninstall symfony/symfony
uninstall ok: channel://pear.symfony-project.com/symfony-1.0.20

Step 2 Create a /opt/symfony directory
Install symfony in /usr/share/php/symfony
[root]# cd /opt/
[root/opt]# mkdir symfony

Step 3 Within the created /opt/symfony directory checkout the symfony 1.0 through 1.4 versions using SVN
[root/opt]# cd symfony/
[root/opt/symfony]# svn co http://svn.symfony-project.com/branches/1.0 symfony10
...
[root/opt/symfony]# svn co http://svn.symfony-project.com/branches/1.1 symfony11
...
[root/opt/symfony]# svn co http://svn.symfony-project.com/branches/1.2 symfony12
...
[root/opt/symfony]# svn co http://svn.symfony-project.com/branches/1.3 symfony13
...
[root/opt/symfony]# svn co http://svn.symfony-project.com/branches/1.4 symfony14
...
 


Step 4 Create symbolic links to the symfony commands in the bin directory
ln -s /opt/symfony/symfony10/data/bin/symfony /usr/bin/symfony10
ln -s /opt/symfony/symfony11/data/bin/symfony /usr/bin/symfony11
ln -s /opt/symfony/symfony12/data/bin/symfony /usr/bin/symfony12
ln -s /opt/symfony/symfony12/data/bin/symfony /usr/bin/symfony13
ln -s /opt/symfony/symfony12/data/bin/symfony /usr/bin/symfony14

To test the links
[root]# symfony10 -V
symfony versoin 1.0.22-LAST
[root]# symfony11 -V
symfony versoin 1.1.10-DEV (/opt/symfony/symfony11/lib)

Step 5 Update any existing symfony 1.0 projects to use the following include directories
project/config/config.php
$sf_symfony_lib_dir  = '/opt/symfony/symfony10/lib';
$sf_symfony_data_dir = '/opt/symfony/symfony10/data';


Step 6 New symfony 1.4 projects can use the following to create the projects
symfony14 generate:project ProjectName

No comments:

Post a Comment