Migration to Symfony 1.1: Step Two

In my previous Symfony 1.1 migration step 1 I descirbed how to upgrade your old Symfony 1.0 project into Symfony 1.1 version. This is works and this is OK.

After that I upgraded project I opened it in my browser and got errors (of course, in development environment you can see it). My Symfony was dissatisfied of presence ‘web_debug: ~’ and ‘flash:     ~’ lines in my ‘frontend/config/filters.yml’. I deleted these lines and everything became OK.

There are too many small issues I’ve discovered while migration process and seems like there will be more.
And another reason – I’m using many plugins from different vendors in my project so these plugins must be custom edited to work well with 1.1 – It’s a lot of work.

I made a final decision – rollback to Symfony 1.0.17 with my project and wait while almost all plugins vendors migrate to 1.2 🙂 Because 1.1 is the transition release and for one year only.

So, I’ve got good experience with migration and have seen powerfull features of 1.1 like forms, events for example – this is right way of development, Fabien! 🙂

We’re looking forward for the 1.2.

Migration to Symfony 1.1: First step

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! 🙂