2025/09/08
Share
Upgrading from CakePHP 2 to CakePHP 3
Project Overview
This project involved upgrading an existing system built on CakePHP 2.6 to a stable release of CakePHP 3.
Because security support for CakePHP 2 had ended, it was necessary to refresh the platform to ensure long-term, stable operations.
Accordingly, we evaluated the CakePHP 3 line and migrated the entire system to CakePHP 3.9.
In parallel, we adjusted middleware for the migration and conducted comprehensive browser testing, prioritizing functional parity and overall stability.
Technology Stack and Development Tools Used
- Programming Language: PHP
- Database: Oracle
- Task Management Tool: Redmine
- Communication Tool: Slack
- Other Tools: Upgrade Tool (https://book.cakephp.org/3/ja/upgrade-tool.html)
Client’s Challenges
The client’s existing system was running on CakePHP 2. However, with security support for CakePHP 2 ending on June 15, 2021, the client faced the following risks:
-
Concerns about security vulnerabilities
-
Inability to meet the latest development standards and requirements
Continuing to operate the system in this state carried significant risks.
Client’s Requirements
For this project, the client requested the following:
・Investigate and adopt a stable release of CakePHP 3
・Align the system’s middleware with CakePHP 3
・Maintain functional parity after the upgrade
・Ensure stable operation on Google Chrome and Microsoft Edge
Our Proposal and Approach
- Selecting a Stable Release
We prioritized stability and maintainability and selected CakePHP 3.9. We also verified the compatibility of the system’s middleware and chose configurations proven to run reliably.
- Leveraging the Official Upgrade Tool
We used the official Upgrade Tool to automatically convert source code and functions from CakePHP 2 to CakePHP 3, increasing efficiency and reducing human error.
- Functional Verification and Browser Testing
After the migration, we performed comprehensive operational testing to confirm functional parity with the legacy system. We also compared behavior before and after the upgrade on Google Chrome and Microsoft Edge to confirm consistency and stability across browsers.
- Rapid Response to Issues
During the migration from CakePHP 2 to CakePHP 3, several issues arose due to changes in the ORM and core API specifications. For each case, we analyzed the root cause, implemented alternative code, and adjusted processing flows, resolving issues quickly and ensuring stable operations.