Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Fix file race condition after view:cache and artisan up #48368

Merged
merged 4 commits into from
Sep 13, 2023

Conversation

roxik
Copy link
Contributor

@roxik roxik commented Sep 12, 2023

This PR will fix error with file race condition after call php artisan view:cache and php artisan up.

Case php artisan up:

User has request, passed condition if ($this->app->maintenance Mode()->active()) then file framework/down deleted by command and then in file_get_contents we have ErrorException.

Solution: recheck file exists

image

Case php artisan view:cache:

Same conditions, but instead file_get_contents we have filemtime

@roxik roxik changed the title fix file race condition after view:cache and artisan up [10.x] fix file race condition after view:cache and artisan up Sep 12, 2023
@roxik roxik changed the title [10.x] fix file race condition after view:cache and artisan up [10.x] Fix file race condition after view:cache and artisan up Sep 12, 2023
@taylorotwell
Copy link
Member

Please remove all textual formatting / spacing changes made to docblocks and mark as ready for review again when complete. Thanks.

@taylorotwell taylorotwell marked this pull request as draft September 12, 2023 21:27
@roxik roxik marked this pull request as ready for review September 12, 2023 22:43
roxik and others added 2 commits September 13, 2023 11:47
…gMaintenance.php

Co-authored-by: Dries Vints <dries@vints.be>
@roxik
Copy link
Contributor Author

roxik commented Sep 13, 2023

@driesvints resolved

@taylorotwell taylorotwell merged commit bfa85b8 into laravel:10.x Sep 13, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants