-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Ignore hidden directories when loading routes from annotations #21832
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
[Routing] Ignore hidden directories when loading routes from annotations #21832
Conversation
I also think we should really skip them. |
Skip dots only skips Status: Needs Work Doctrine bridge tests are failing now ;) Edit: Doctrine bridge tests are failing for a different reason. Looking into it. |
return '.' !== $current->getBasename()[0]; | ||
} | ||
), | ||
\RecursiveIteratorIterator::LEAVES_ONLY |
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.
you can still add FilesystemIterator::SKIP_DOTS
what about FilesystemIterator::FOLLOW_SYMLINKS
also?
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.
on the RecursiveDirectoryIterator
of course
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.
.
and ..
are already filtered out by '.' !== $current->getBasename()[0];
:)
Not sure about following symlinks. This is not a problem we're solving atm, so I wouldn't add it until someones comes up with a use case
ecca8a0
to
d749406
Compare
d749406
to
ce9df02
Compare
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.
👍
Status: reviewed
Thank you @jakzal. |
…om annotations (jakzal) This PR was merged into the 2.7 branch. Discussion ---------- [Routing] Ignore hidden directories when loading routes from annotations | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21497 | License | MIT | Doc PR | - The problem surfaced after implementing #18869. Therefore it doesn't exist on 2.7, but I'd still merge it there to avoid conflicts when merging between branches. Without this fix, the oldest branch the added test will fail is 3.2. Commits ------- ce9df02 [Routing] Ignore hidden directories when loading routes from annotations
…colas-grekas) This PR was merged into the 3.3-dev branch. Discussion ---------- [Config] Sort "globbed" paths to make them predictable | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Spotted while reviewing #21832 ping @jakzal FYI Note that glob already sorts its output, and Finder and glob skip dot dirs. Commits ------- ea1deff [Config] Sort "globbed" paths to make them predictable
The problem surfaced after implementing #18869. Therefore it doesn't exist on 2.7, but I'd still merge it there to avoid conflicts when merging between branches. Without this fix, the oldest branch the added test will fail is 3.2.