Start a legacy PHP modernisation with a piece of work someone in the business can explain from beginning to end. Use it to decide how far the first change can go. If a self-contained part does its job well, refactor it. If it has a clear handover point, consider replacing it gradually. For a rewrite, you also need a credible way to move the old data into the new model.

Find the rules nobody wrote down

Pick an order and ask someone to walk you through it. What happens if a line is cancelled afterwards? What amount appears on the document? What does the accounting export say? The answers often contain rules that never made it into a specification. You learn about them when somebody shows you an unusual case.

Capture the inputs and the observed result with suitable test data. Ask the business owner which behaviour they actually want. A characterisation test records what happens today. It needn't preserve a calculation error for another decade. If nobody can agree whether a discrepancy is a bug, you've found a decision the modernisation will have to settle.

Refactor while the application still owns the job

If orders, invoices and exports are staying with the same application, a small change in place is often the most dependable starting point. Extract a calculation from a long controller method, for example. The caller provides the same input and sees the same answer. The next change can be tested in one place.

The benefit arrives early because that change can ship on its own. Refactoring becomes a harder sell when every small change reaches into conflicting records or unrelated parts of the business. Before adding another helper, find out who owns the whole transaction.

Replace a slice with Strangler Fig

Imagine a report that reads order data and produces a document. While the new report is read-only, you can feed both versions the same records and compare the output. The replacement can later take over that one job while the rest of the old application stays in use. That's one possible first slice of a Strangler Fig migration.

Things get harder when both applications can change the same record. Which version wins if an operator makes a correction? Can an older order still be cancelled after its format has changed? Until those questions have answers, a technical interface gives you a weak boundary between the two. An export may be an easier slice than the whole order book.

When a rewrite has a business case

Sometimes the existing model no longer fits the business. A new product might allow several benefits to run concurrently under one contract, while the old application only understands one. If every extension fights a fundamental assumption, a replacement has a business rationale. The age of the framework alone tells you very little.

Ask for a complete rehearsal before committing. Can somebody enter, correct and close a representative case in the new model? Can the team migrate a corresponding old record, including the awkward exception from the first walk-through? A new input screen alone tells you little about the remaining work.

What interruption can the business tolerate?

For the first release, write down who needs to keep working and which records may change during the switch. A read-only screen can often be switched back. If the new application has accepted transactions, switching back to the old version could hide those transactions. A viable way back covers them too.

On the entsorgo project, we introduced a Laravel platform in stages while day-to-day operations continued. entsorgo and DUNA belong to the same group of companies. It's an example of why a usable intermediate release matters to the business. Your data and dependencies determine which replacement strategy is appropriate for your application.

The PHP runtime has its own deadline

A runtime change has to work with your libraries, extensions and the background jobs that actually run. Check the official PHP support table. Security support for PHP 8.2 ends on 31 December 2026. That technical deadline exists even if the business modernisation will take longer.

Plan the proof for the new runtime separately from the decision to rewrite. One needs compatible dependencies and tested business operations. The other needs a sound reason to split up or replace the system. If slow response times dominate the initial findings, see our guide to diagnosing a slow Laravel application. A simultaneous move of the public site also warrants a relaunch checklist.

For a software modernisation, identify the first useful change you can deliver. For an initial assessment of a PHP application, one process that causes trouble whenever it changes is a good place to start. Discuss the modernisation