Bring up to standard PHP legacy code - Introduction
In this series of articles, I will present you a way on taking on a large project such as migrating a legacy PHP application up to standards.
This is gonna be a series on how to bring up to speed a PHP legacy application. You may have been tasked to take over a legacy application or maybe you want to finally port this PHP 5.3 application to 7.4 (latest stable release at the moment of writing). Whatever your situation is, bringing up to speed a legacy application might be a challenging mission.
During my professional experiences I always had to deal with an already mature and developed application, taking over thousands of lines of code written by people, maybe, who aren't here anymore to answer our daunting questions.
In this series I will break it down into different part to gradually improve the code quality and be confident into migrating the application. Whether your are on your own for your personal application or you've been put on this project by your boss, you will always need a plan that you can base your work on or to justify what you're about to start.
- Getting a general idea of the application status
- Start with the Code Standards (EasyCodingStandard)
- Upgrade your code to the latest PHP version (Rector)
- Add Unit Tests (PHPUnit)
- How to add features while still migrating the application?
- Detect future potential bugs (PHPStan/Psalm)
I hope this series will guide you and provide you with enough basis for you to take on on your migration!