Jonathan Wage
about 1 year ago
Call the expert
6
Now that the release of Doctrine 1.1 right around the corner their has been a bit of noise about how users can use 1.1 instead of the default bundled 1.0.
With sfDoctrinePlugin it is easy to swap out the version of Doctrine used by simply changing one configuration value.
Below you will find an example of how you can configure sfDoctrinePlugin to use a different version of Doctrine, for example 1.1.
First we need to check out the version of Doctrine we want to use into lib/vendor/doctrine:
$ cd lib/vendor
$ svn co http://svn.doctrine-project.org/branches/1.1/lib doctrine
Now we can configure the sfDoctrinePlugin to use that version of Doctrine instead of the one that comes bundled with the plugin. In your ProjectConfiguration::setup() method you need to change the value of the sfDoctrinePlugin_doctrine_lib_path with sfConfig, like the following:
public function setup() { sfConfig::set('sfDoctrinePlugin_doctrine_lib_path', sfConfig::get('sf_lib_dir') . '/vendor/doctrine/Doctrine.php'); }
Now you can enjoy the great features of Doctrine 1.1 without too much work. You can check out what is new in Doctrine 1.1 by reading the upgrade file.
Comments 
-
#1 Fabian said about 1 hour later

much easier than i thought!
-
#2 Sylvain said about 17 hours later

Looks good ! What about the compatibility with Symfony 1.2 ? I'm asking because if there is no problem, why Doctrine 1.1 is not on 1.2.2 ?
-
#3 Jacek Jędrzejewski said about 19 hours later

@Sylvain: 1.1 isn't stable. 1.1 RC1 was released about 1 hour ago...
-
#4 jwage said 1 day later

@Sylvain 1.3 will use Doctrine 1.1. 1.2 cannot switch to 1.1 because of backward compatibility.
-
#5 jmacias said about 1 month later

It's seems to not work because symfony autoload.
-
#6 Jonathan H. Wage said about 1 month later

This isn't happening for everything. It is an odd behavior. Can you try the fix suggested here: http://trac.symfony-project.org/ticket/5741





