Firstly, make sure you read the 2.0 Migration Guide.
Then follow the instructions for using the Upgrade shell.
Having done this I found there were a few things that the shell hadn’t done:
- The app/Controller directory should contain AppController.php and PagesController.php (in addition to your newly renamed controllers). In my case these files weren’t copied across so I had to do this manually from the source tarball.
- The app/Model directory should contain AppModel.php but I had to copy this myself.
- Similarly, the shell didn’t replace my old copies of app/webroot/index.php or app/webroot/test.php so I had to do this by hand.
- I needed to merge changes in:
- app/Config/core.php
- app/Config/database.php
- app/Config/routes.php
- The shell doesn’t rename the test directories to conform to the new naming conventions although this doesn’t seem to be a problem (although it’s worth doing anyway).
- The shell doesn’t warn you if you use anything that has been removed in version 2. For example, I used the JavaScript helper in my 1.3 app but this isn’t present (has been merged with the HTML helper) in v2
Also, if you get an error that looks like:
Notice: Undefined index: Error in /lib/Cake/Core/Configure.php on line 100
then it’s likely that you haven’t updated your app/Config/core.php file (diff the file with the one in the new tarball to find things that are new or updated).