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

Resolve issues with silent Artisan failures & FileStore cache flushing #33457

Closed
wants to merge 1 commit into from

Conversation

mallardduck
Copy link
Contributor

This PR has been created in response to #33310 and seeks to resolve that issue and an issue previously discussed as #1179. As well as being a follow up to PR #25254 - to more fully catch the issues that PR attempted to address.

The only flaw (for lack of better term) with the previous PR was that the underlying FileStore::flush() method wasn't reliably returning false as the result response. This is in turn due to how Filesystem::deleteDirectory() works, since this method simply silently fails if there are issues with removal.

Since Filesystem is such a fundamental component and changing deleteDirectory that much would surely break tests and be a BC issue. So solving the issue in the FileStore class seems like a good option, since we can be 'defensive' about the results of deleteDirectory.

This change subtly adjusts how directory deletions are confirmed. The main change being that we're reactively confirming if the directory was deleted.

The original code assumes that the deleteDirectory method is always going to return false when it fails. This is an incorrect assumption to make.
Because the deleteDirectory method actually will only return false if the input path isn't a directory. And it will silently fail if it has issues with removal of the directory and/or it's children items.
@driesvints
Copy link
Member

Hey @mallardduck, thanks for the pr. Can you send this to the 6.x LTS branch? We're still doing bug fixes for Laravel 6.

@driesvints driesvints closed this Jul 7, 2020
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.

2 participants