CakePHP Upgrade 2.10 -> 3.7

Hi all

I have a largish app to upgrade, and before trying to upgrade I thought it would be worth testing the upgrade tool on something simple.

I’ve taken the CakePHP 2 tutorial “blog” and tried to step through the the upgrade, it all seems to work however I get to the end but get the following error

[27-Apr-2019 11:05:22 UTC] PHP Fatal error:  Uncaught Error: Class 'Cache' not found in /Applications/MAMP/htdocs/blog/config/bootstrap.php:17
Stack trace:
#0 /Applications/MAMP/htdocs/blog/vendor/cakephp/cakephp/src/Http/BaseApplication.php(152): require_once()
#1 /Applications/MAMP/htdocs/blog/src/Application.php(38): Cake\Http\BaseApplication->bootstrap()
#2 /Applications/MAMP/htdocs/blog/vendor/cakephp/cakephp/src/Http/Server.php(121): App\Application->bootstrap()
#3 /Applications/MAMP/htdocs/blog/vendor/cakephp/cakephp/src/Http/Server.php(82): Cake\Http\Server->bootstrap()
#4 /Applications/MAMP/htdocs/blog/webroot/index.php(40): Cake\Http\Server->run()
#5 {main}
  thrown in /Applications/MAMP/htdocs/blog/config/bootstrap.php on line 17

Feeling a bit dumb at the moment - can’t upgrade the tutorial what chance of upgrade a large app :frowning_face:


The upgrade tool takes care of things that can reliably be done automatically. It moves the file structure around, changes class names, adds namespace declarations, that sort of thing. The majority of what needs to be done to convert an application remains a manual process; it’s not a trivial thing.

Missed stuff in the autoload - got it sorted now