Hello guys!
Today I decided to migrate one of my project built in Symfony 1.0.16 to Symfony 1.1
I made Symfony upgrade from pear in this way:
# pear upgrade symfony/symfony
And it has downloaded and installed successfully new Symfony 1.1.0 package.
Well done, but the project is under older version still
After that went to the project forlder and tried to run ‘symfony’ command… I got plenty of PHP errors, some files were missed and so on… crap! But these errors pointed me on only one reason – something is wrong with configuration!
I decided to do this is the following way – I generated new symfony 1.1 project by this command:
symfony generate:project ProjectName
It worked fine and I got clean new project.
I copied ‘symfony’ from the project root of the newly generated project to the old project root, replacing the old one.
Also I copied ‘ProjectConfiguration.class.php’ from new /config folder to the old /config folder.
And ran ‘symfony’ command with crossed fingers… Wow! Works! I got symfony help commands list!
But the project still under old Symfony version…
If you run ‘symfony’ command you can see there the following:
project :clear-controllers Clears all non production environment controllers (clear-controllers) :deploy            Deploys a project to another server (sync) :disable           Disables an application in a given environment (disable) :enable            Enables an application in a given environment (enable) :freeze            Freezes symfony libraries (freeze) :permissions       Fixes symfony directory permissions (permissions, fix-perms) :unfreeze          Unfreezes symfony libraries (unfreeze) :upgrade1.1        Upgrade a symfony project to the 1.1 symfony release
We need the last line!
So I ran the command
#symfony project:upgrade1.1
And i got many lines of migration process result.
Like this:
>> config The following file is not used anymore. Please remove it. E:/Projects/sfprojects/projectname/apps/frontend/config/logging.yml >> config The following file is not used anymore. Please remove it. E:/Projects/sfprojects/projectname/apps/frontend/config/i18n.yml >> config The following file is not used anymore. Please remove it. E:/Projects/sfprojects/projectname/apps/frontend/config/config.php >> config If you made some customization in this file, >> config please migrate the content to the configuration classes. >> config The following file is not used anymore. Please remove it. E:/Projects/sfprojects/projectname/config/config.php >> config If you made some customization in this file, >> config please migrate the content to the configuration classes. >> config Migrated "E:/Projects/sfproject...projectname/web/frontend_dev.php" >> config Migrated "E:/Projects/sfproject...projectname/web/index.php" >> file+ E:\Projects\sfprojects\projec...frontendConfiguration.class.php >> tokens E:\Projects\sfprojects\projec...frontendConfiguration.class.php >> factories.yml Migrating E:/Projects/sfproject...e/frontend/config/factories.yml >> flash Migrating E:/Projects/sfproject...ame/frontend/config/filters.yml >> layout Migrating E:/Projects/sfproject...e/frontend/templates/layout.php >> propel Migrating E:\Projects\sfproject...projectname\config/propel.ini >> propel Migrating E:\Projects\sfproject...projectname\config/propel.ini >> settings.yml Migrating E:/Projects/sfproject...me/frontend/config/settings.yml >> factories.yml Migrating E:/Projects/sfproject...s/frontend/config/factories.yml >> settings.yml Migrating E:/Projects/sfproject...ps/frontend/config/settings.yml >> test Migrating E:\Projects\sfproject...ectname\test/bootstrap/unit.php >> test Migrating E:\Projects\sfproject...e\test/bootstrap/functional.php >> web_debug Migrating E:/Projects/sfproject...ame/frontend/config/filters.yml
This shows that migration is OK but we need to delete some files listed above.
After I deleted files I realized that migration is over!
I point my browser on my local VirtualHost for this project and got error which I’ll describe in the following migration step.
Happy migration!