I’ve been working on a project, which started on 1.2.7, for almost 6 months now and have been upgrading it religiously along the 1.2.x branch which stopped at 1.2.10. We’re currently entering the testing stage, and being as curious as I am opted to create a 1.4 branch from the current trunk and started the upgrade process while merging fixes from the trunk as fixes come in. We’re using the PEAR-based approach which allows us to quickly upgrade the base installation as soon as a new release comes in. Although i’m planning to migrate it to the subversion approach soon, but thats another blog post.
So lets start with the upgrade, symfony 1.4 and 1.3 is basically the same feature-wised but the former lacks the backwards compatibility that the latter provides, basically 1.3 is just a stepping stone to upgrade to 1.4. The Symfony team really did a great job on the seamless upgrade process. Also to have a better background on the upgrade process read the upgrade document from their website (http://www.symfony-project.org/tutorial/1_4/en/upgrade). Ok, so lets start with the upgrade.
Lets uninstall symfony 1.2
pear uninstall symfony/symfony
Then install symfony 1.3
pear install symfony/symfony-1.3.1
Once installed, make sure to upgrade the plugins, rebuild the models, and clear the cache to make sure you’re using the new files. Now you can opt to continue upgrading to 1.4 and drop the backwards compatibility or just stick with 1.3 for the time being, both of which are being supported but 1.4 is a LTS release, meaning that it has a longer support period than 1.3. Before upgrading to 1.4 it is important to remove old class files, symfony provides a build-in task to ease the transition. Just execute this command and symfony will list down all of the deprecated stuff that should be remove/modified, they also provided documentation on what to replace the deprecated stuff with (http://www.symfony-project.org/tutorial/1_4/en/deprecated)
symfony project:validate
So now that you’ve removed/modified all of the deprecated stuff, upgrading is quite similar to 1.3.
Remove the old symfony installation
pear uninstall symfony/symfony
Install the new one
pear install symfony/symfony-1.4.1
Then just clear the cache. Also the freeze/unfreeze task has been removed in 1.4; it may or may not be important to you but I use it when deploying to our servers, one quick fix is to just create a lib/vendor folder and copy/paste the symfony folder found in your PEAR installation folder, and then modifying the include call in the config/ProjectConfiguration.class.php file. So now you have a easily upgradable and independent symfony installation inside your app.
