1 Commits
Author SHA1 Message Date
Andras BacsaiandClaude Opus 5.5 b850a06d26 fix(cache): write config and route cache files atomically
Laravel writes bootstrap/cache/config.php in place, so the file is empty
until the write ends. app:init rebuilds the cache on every container start
while PHP-FPM already serves requests. A request could read the empty file
(TypeError in LoadConfiguration), and OPcache with validate_timestamps=0
kept it, so every request failed until a restart.

Write to a temporary file in the same directory and rename it over the
target. A failed write now keeps the old file instead of an empty one.

Fixes #12120

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:26:48 +02:00