Describe your migration paths

They have: 121 posts

Joined: Dec 2008

Greetings all;

I've been thinking about my migration paths for projects in PHP, taking a project from inception to production, then managing change requests and fix testing and their subsequent migration to a live system.

I currently try to keep three instances for all projects:
1) development - for me to mess around in
2) client testing - for clients to sign off changes
3) production

I use the Zend_Config class and an associated ini file to keep all instance configuration in one file, and a file containing a flag that is different and not under source control in each instance to pick up the different attributes

I then use 'svn update' on the instances to move the changes up the ladder. Only 'commited' changes to the repository ever make it past the development instance

It's not bad, but a bit of a pain when I have to update third party libraries, which I rather not keep under my own source control, and that non-source-controlled instance identifier file makes me feel unclean.

Anyone willing to divulge their secrets to success in this arena?

Cheers,
Shaggy

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Why not have the third-party libraries under version control? You might want the ability to roll back those as well.

Your method is very similar to mine for large web projects, and it works very well, IMO. I use CodeIgniter for a lot of my projects, and I have the config files as config.php.TEMPLATE in the repository, and then I create a local, unversioned copy for each checkout of the site (stage & production).

They have: 121 posts

Joined: Dec 2008

Hmmm, I hadn't imagined anyone doing that... I suppose that is why they make hard drives so large these days!

Since you're the only one that bit, maybe I can get a little more hints from you! What about configuration objects in the database? Script to migrate them? Export utility? Other?

Cheers,
Shaggy

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.