Migrating an aging PHP monolith to a modular architecture requires a progressive strategy to avoid downtime.

Recipe

  1. Diagnose with Deptrac.
  2. Avoid 20-microservice big-bang. Find natural domain boundaries.
  3. Modularize in-place first.
  4. Strangler pattern on lower-risk domains.
  5. Outbox for cross-boundary communication.
  6. Extract progressively, keep low-risk pieces in the monolith.