Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Finder] Throw a dedicated exception for non-existing directory#30744

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromxelan:feature/finder-directory-not-found-exception
Mar 30, 2019
Merged

[Finder] Throw a dedicated exception for non-existing directory#30744

fabpot merged 1 commit intosymfony:masterfromxelan:feature/finder-directory-not-found-exception
Mar 30, 2019

Conversation

@xelan
Copy link
Contributor

QA
Branch?master
Bug fix?yes [1]
New feature?yes
BC breaks?no
Deprecations?no [2]
Tests pass?yes
Fixed tickets#30723
LicenseMIT
Doc PRN/A [3]

MakesFinder::in() throw aDirectoryNotFoundException instead of anInvalidArgumentException if one of the directories is not found.
This behavior is more consistent with theAccessDeniedException for files which are unreadable due to insufficient permissions.
To keep backward compatibility, the new exception class inherits fromInvalidArgumentException.

[1] A valid, but non-existent directory name is IMHO not an invalid argument
[2] However, it may be semantically better to extend fromRuntimeException, This would require a deprecation.
[3] Possible exceptions are currently not explained athttps://symfony.com/doc/current/components/finder.html

Makes Finder::in() throw a DirectoryNotFoundException instead of an InvalidArgumentException if one of the directories is not found.This behavior is more consistent with the AccessDeniedException for files which are unreadable due to insufficient permissions.To keep BC, the new exception class inherits from InvalidArgumentException.
@nicolas-grekasnicolas-grekas added this to thenext milestoneMar 28, 2019
@fabpot
Copy link
Member

Thank you@xelan.

@fabpotfabpot merged commit48d5f94 intosymfony:masterMar 30, 2019
fabpot added a commit that referenced this pull requestMar 30, 2019
…directory (xelan)This PR was merged into the 4.3-dev branch.Discussion----------[Finder] Throw a dedicated exception for non-existing directory| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes [1]| New feature?  | yes| BC breaks?    | no| Deprecations? | no [2]| Tests pass?   | yes| Fixed tickets |#30723| License       | MIT| Doc PR        | N/A [3]Makes `Finder::in()` throw a `DirectoryNotFoundException` instead of an `InvalidArgumentException` if one of the directories is not found.This behavior is more consistent with the `AccessDeniedException` for files which are unreadable due to insufficient permissions.To keep backward compatibility, the new exception class inherits from `InvalidArgumentException`.[1] A valid, but non-existent directory name is IMHO not an invalid argument[2] However, it may be semantically better to extend from `RuntimeException`,  This would require a deprecation.[3] Possible exceptions are currently not explained athttps://symfony.com/doc/current/components/finder.htmlCommits-------48d5f94 Throw a dedicated exception for non-existing directory
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@xelan@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp