How to work with Symfony 1.1(dev) and Doctrine 1.0

21 11 2007

For running Symfony 1.1 development version in parallel to your 1.0.x installation you may refer to http://www.symforc.com/post/2006/08/01/Testing-Symfony-11. It explains everything you need in great detail.

For running a 1.1Dev version only project you do:

cd /usr/share/pear/
svn co http://svn.symfony-project.com/trunk/lib symfony
svn co http://svn.symfony-project.com/trunk/data data/symfony

In my case I use /usr/share/php/ rather than /usr/share/php.

Now you have to choose whether to run a real symfony installation or to just run a sandbox.

For a sandbox:

Go to the directory where you want to place your sandbox and run:

$ /usr/share/pear/data/symfony/bin/create_sandbox.sh

For a real installation:

Make a softlink from /usr/bin/symfony to /usr/share/pear/data/symfony/bin/symfony Go to the directory you want to start your project in and run:

$ symfony generate:project <your_project_name>

Now install sfDoctrinePlugin:

In your projects root directory you checkout the trunk of sfDoctrinePlugin by running:

$ svn co http://svn.symfony-project.com/plugins/sfDoctrinePlugin/trunk plugins/sfDoctrinePlugin

This will effectively install the correct version of doctrine corresponding to your Symfony installation.

Beware sometimes you can get the following error:

Fatal error: Class 'sfDoctrineBaseTask' not found in
/var/www/localhost/plugins/sfDoctrinePlugin/lib/task/
sfDoctrineInitCrudTask.class.php on line 18

To solve this you have to remove all files from /tmp that have ’sf’ or ’symfony’ or ‘cache’ in their name. this is a bug in Symfony 1.1 that keeps some informations persistent in /tmp that are no longer valid.

Not too much information here but it took me a while to figure it out. ;)

Thanks to Ian P. Christian for pointing me towards the /tmp solution!

Powered by ScribeFire.

, ,