Day one: nobody could get in
On my first day on the project, nobody could log in anymore. Connected to the server over SSH, I ruled out causes one by one: the route cache had been generated in debug mode and never rebuilt, so the login JavaScript wasn’t loading.
I fixed it and turned it into a release rule, so it can’t happen again.
Invoices with the same number
Invoice numbering was producing duplicates. I fixed it with a database lock, so two invoices issued at the same moment can’t get the same number.
Stock and prices that can’t go wrong
Only one service can write stock levels, always inside a transaction. Prices are checked again on the server, so they can’t be tampered with from the browser.
Careful releases
Before every release I take a backup and run the migrations forwards and backwards on a copy of production. One single release carried 27 of them.
Someone else’s code, without rewriting it
Around 39,000 lines of components written by others. I followed their conventions instead of imposing mine, so the code stays consistent.