-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Description
Laravel Version
10.48.22
PHP Version
8.1.2
Database Driver & Version
No response
Description
I use a simple deployment bash script that runs git pull followed by some cache commands, including php artisan view:cache. This can often result in the last modified timestamp of a Blade file having the same timestamp as its corresponding compiled view. Laravel's view compiler uses a >= comparison when checking if the compiled view is expired, which means all the views compiled in my deployment script aren't being used. Is there a reason why it can't use a > comparison instead?
https://github.com/laravel/framework/blob/11.x/src/Illuminate/View/Compilers/Compiler.php#L112
Steps To Reproduce
- Use a bash script to pull changes from a git repo that modify a Blade file. In the same bash script, run
php artisan view:cache. - Use
Illuminate\Filesystem\Filesystem::lastModifiedto check the timestamp of the modified Blade file and compare it to the timestamp of any compiled view. You will see they are the same.
Metadata
Metadata
Assignees
Labels
No labels