Legacy Consulting
Before considering the following services, I highly recommend that you automate your tests. Without them, changes to your application can cause unexpected issues that may not be apparent until much later, even with thorough manual testing. Also, repeated manual testing of the entire application will put so much strain on your team that it will often be cheaper and faster to automate upfront.
Improve Maintainability
There are many ways to improve a legacy application. Here is a non-exhaustive list:
- Introduce Composer to manage dependencies. This will enable you to update libraries more often and more easily. This is generally a low-hanging fruit, except in cases where you have a library with heavy local modifications, which we'll need to address separately.
- Replace PSR-0 with PSR-4. Use of PSR-0 may prevent your from using certain libraries, such as PHPUnit. PSR-4 keeps your files a lot more organized, takes advantage of namespaces, and improves autoloading performance. The introduction of namespaces will also prevent class name collisions.
- Decouple your application code from a framework or library. This improvement is most useful before migrating to a new framework. However, it's useful on its own, because it will make your code more unit-testable and maintainable, reducing the effort required to add new features to your application.
- Relocate the seams. Much legacy code is hard to maintain because it was split into multiple applications, but in a way that causes more problems than it solves, due to the seams being in awkward places. The most common strategy to address this is to merge it back to a monolith, then split along new seams that are much more logical.
- Reduce technical debt by introducing best practices. This is not specific to legacy code. It will make the code significantly easier to work with, so this investment will pay for itself in a very short time.
We will decide which of these will bring the most value by discussing your goals and analyzing your code.
Upgrade PHP Version
Version upgrades are generally low-risk endeavors and are a great first step to modernizing your application. Certain compatibility issues, such as the use of removed extension, introduce more risk. However, I can help mitigate those risks.
You can read this ever-growing guide to PHP version upgrades that I published on the Zend website: https://www.zend.com/php-migration/incompatibilities
In some situations, you may need to keep the code compatible with both PHP versions. This takes a little longer, but is feasible.
Migrate Framework
I will modify your application to function with a more recent version of the framework, or with an entirely new framework. More modern frameworks have fewer bugs, provide better features, are more secure and have better performance.
I can also do this with various libraries and extensions. For example, you may want to move away from Doctrine 1 or Propel, or you may want to replace mcrypt with OpenSSL.
Before undertaking such a migration, I highly recommend that we start by uncoupling the application from the framework or library. If we don't, not only will the migration take longer and be riskier, but you'll also end up with code that doesn't take full advantage of the new framework. Additionally, without uncoupling, you'll have to put in as much effort every few years to keep up with the latest framework.