Two hundred and forty require_once calls where load order was load-bearing, moved onto an autoloader one namespace at a time without a big-bang rewrite.
Floating point cannot represent 0.1 exactly, so money arithmetic accumulates error that shows up as a total that is one cent off. The usual response is to round…
The application already has a Mailer interface and eleven classes depend on it. The transactional-email service being brought in ships a client with a different method name, a…
A codebase split into Billing, Catalogue and Shipping namespaces, each with its own repositories and services, looks modular in the directory listing. Then one report joins four tables…
ALTER TABLE on 30 million rows blocks writes for 40 minutes, and checkout writes to that table. A shadow table, triggers, and a backfill paced by replication lag.
“Send the confirmation in the background” arrives as a requirement long after the code that sends it has settled into a controller method, wired to a request and…
A payment provider’s SDK ends up referenced in a controller, in two models, in a console command and in nine tests. Changing provider then means changing all of…
A site built as products.php, basket.php and checkout.php carries the same fifteen lines at the top of every file: session start, config include, database connection, a login check.…