-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Open
Labels
Description
Laravel Version
11.23.5
PHP Version
8.2.24
Database Driver & Version
No response
Description
When you're using the cache based maintenance mode, Laravel still tries to create the framework/maintenance.php
file. However, this file does nothing when there's no down-file, which is the case when you're using the cache driver, so basically it is useless.
Example of when this is an issue:
- When running a multi server environment, only the server where the down command is ran, will have the maintenance file and the others don't.
- When running on a read-only filesystem, the down command will error as the file can't be created.
In both these situations the cache driver should suffice, but currently it has this issue.
N.B. I proposed a solution in #53228, but that wasn't accepted.
Steps To Reproduce
- Make sure your cache store isn't file based;
- Set the maintenance mode driver to cache;
- Make the
storage
directory read-only; - Run
php artisan down
; - See that the command fails because it can't create the maintenance file.
grafst