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
[Finder] adds a way to ignore AccessDeniedException #7518
Conversation
@vicb are you okay with the |
*/ | ||
public function ignoreUnreadableDirs($ignore = true) | ||
{ | ||
$this->ignoreUnreadableDirs = $ignore; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Boolean) $ignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
Does not sound 100% right to me but I can't find anything better. May be a native speaker could help here to know if this is good or come with a better name ? |
So maybe |
Maybe |
Or the other way round, for example |
@vicb do you have an idea regarding to above suggestions? |
I let you pick the best. I think there must be a verb in the name, ie I have one question that is somehow related to this PR: What happens with unreadable files ? Let's say that you are looking for a file which contains "<?php" but some of the file are not readable by the process which runs the Finder, what would happen, Would the If this is not the case yet, the code should be updated (both native & php drivers). There should also be a way to ignore those exceptions, ie |
Go for In the case of an unreadable file content lookup, the native adapter throws an |
why ? Edit: ok, found why |
This PR was merged into the master branch. Discussion ---------- [Finder] adds a way to ignore AccessDeniedException This PR adds a `Finder::ignoreUnreadableDirs()` method which tells `Finder` to ignore unreadable directories instead of throwing an `AccessDeniedException`. | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6981 Commits ------- a63b30b [Finder] added Finder::ignoreUnreadableDirs() method
This PR adds a
Finder::ignoreUnreadableDirs()
method which tellsFinder
to ignore unreadable directories instead of throwing anAccessDeniedException
.