CakePHP 2, 3 and 4 migration to CakePHP 5
CakePHP 2 lost support in June 2021, and CakePHP 3 has reached end of life. We migrate older CakePHP applications to CakePHP 5 on a supported PHP version, or to Laravel if that serves you better.
- $orders = $this->Order->find("all", array(- "conditions" => array("Order.status" => "open")));+ $orders = $this->Orders->find()+ ->where(["Orders.status" => "open"])+ ->all();
Many business systems still run on CakePHP 2
CakePHP was one of the most popular PHP frameworks of the late 2000s and 2010s, and plenty of internal systems, portals and back offices built then are still running. The problem is that CakePHP 2 doesn't run on PHP 8, so these apps are stuck on PHP versions that no longer get security fixes.
CakePHP has been part of our toolkit for many years. We know the conventions of each major version, which makes migration predictable rather than archaeological.
What's included
- An inventory of controllers, models, plugins and custom code
- A plan: upgrade within CakePHP, or move to Laravel
- Models moved to the modern ORM with its query builder
- Views, helpers and components brought up to date
- Tests for the most important business journeys
- PHP upgraded to a supported version
How a CakePHP migration works
Inventory
We map every controller, model, plugin and third-party library, and find code nobody uses any more.
Choose the path
CakePHP 5 if your team knows CakePHP. Laravel if you want a larger hiring pool and ecosystem. We price both.
Migrate in stages
Data layer first, then each area of the app, tested on staging against how it behaves today.
Release
Go-live with a rollback plan, then maintenance to keep it inside the supported window.
Why CakePHP 2 and 3 migrations take planning
CakePHP 3 was a major rewrite. The ORM changed from arrays to entity objects and query builders, the folder structure changed, and namespaces arrived. Moving from 2.x is closer to a careful port than an upgrade. From 3.x or 4.x to 5.x, the steps are smaller and the official upgrade tool handles much of the mechanical work.
CakePHP or Laravel?
Staying on CakePHP keeps your team's knowledge and the shape of the code. Moving to Laravel costs more upfront but gives you the largest PHP ecosystem and talent pool. We'll recommend one in the health check and show you the cost of each.
Check the official CakePHP supported versions page for current support dates.
CakePHP migration questions
Can we just upgrade PHP and leave CakePHP 2 alone?
No. CakePHP 2 doesn't support PHP 8, so the framework has to move before PHP can. Until then, the app stays on an unsupported PHP version.
Will the database need to change?
Usually only a little. Most migrations keep the existing MySQL or PostgreSQL database, with small changes to follow the new conventions.
How long does it take?
It depends on the size of the app and the number of plugins. A fixed quote follows the health check.