HowToUpgradeToVersion1 (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToUpgradeToVersion1

rbq (IP:
04/08/08 10:04:13 (10 years ago)

moved from HowToUpgradeToLatestBeta


  • HowToUpgradeToVersion1

    v0 v1  
     1= How to upgrade to 1.0beta-1 from 0.7.1914 = 
     3'''Warning''': The following description is not the easiest way to upgrade. The best way is to call the `symfony.php` script, located in the symfony installation directory, from the root of the project directory. 
     6> cd myproject 
     7> php /path/to/pear_data_dir/bin/symfony upgrade 1.0 
     10It will take care of all the steps described in this page. 
     12Also, This page should be updated to talk about 1.0 stable. 
     16This is a short HOW-TO to get your projects running on the latest release 1.0-beta1. I will assume you've installed the framework using !PEAR and work that way - this only applies to upgrading the framework itself, project specifics apply to any framework install method. 
     18Firstly, we upgrade the framework by issuing the {{{pear upgrade symfony/symfony-beta}}} command. If no errors were issued, then your framework has been successfully upgraded. If not, try using the following set of commands (worked for me in the past, why not): 
     21pear upgrade PEAR 
     22pear channel-update 
     25Having the framework installed, we move on to each project using a framework prior to 1.0beta-1. The main differences here are in three key files that must be modified before the {{{symfony}}} command can work. These are: 
     33== /SYMFONY == 
     35First off, {{{SYMFONY}}} is no longer a zero-length file, and the filename is lowercase now. Rename the file to lowercase (irrelevant for Windows, since the shell ignores file cases, but migrating to Linux will not cause a problem in this case) and insert this code block: 
     38#!/usr/bin/env php 
     42 * This file is part of the symfony package. 
     43 * (c) 2004-2006 Fabien Potencier <> 
     44 *  
     45 * For the full copyright and license information, please view the LICENSE 
     46 * file that was distributed with this source code. 
     47 */ 
     54== /config/config.php == 
     56Next is the global project {{{/config/config.php}}} file. Instead of the default blank file, you now need to have two additional lines if you've already set your own constants in the file (in this case, just insert these lines before any of your code): 
     61// symfony directories 
     62$sf_symfony_lib_dir  = 'C:\PHP\pear/symfony'; 
     63$sf_symfony_data_dir = 'C:\PHP\pear\data/symfony'; 
     66== /apps/[appname]/config/config.php == 
     68Lastly, you need to update each of your applications' config files in the {{{/apps/[appname]/config/config.php}}} file. That file, in addition to any code you may have inserted yourself, must contain the following: 
     73// include project configuration 
     76// symfony bootstraping 
     78sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir); 
     81Again, it is advisable to insert all these lines at the top of the file, to avoid path problems and such. 
     83== Updating the project == 
     85Now that we've managed to make the symfony command work in the root project folder, we're ready to upgrade all the other files using the automatic upgrade script: 
     88symfony upgrade 1.0 
     91The command also gives instructions on what to do next, but for your convenience I'll list the commands for you: 
     94symfony propel-build-model 
     95symfony cc 
     98The first one regenerates your Propel classes to use the latest version of the OM included in 1.0-beta1, the second clears the cache to make symfony regenerate and use the new classes. 
     100Navigate your browser to wherever you have your project installed, and you should see your project in its entirety working as it should, unless you've used any deprecated methods or classes, in which case the framework will notify you of any changes to your model. 
     102In either case, it should be trivial for you to debug your apps with the new and shiny version. 
     104Have fun!