feature #21854 [Router] Follow symlinks and skip dots in the annotation directory loader (jakzal)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Router] Follow symlinks and skip dots in the annotation directory loader
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Following #21833, this change will make the `AnnotationDirectoryLoader` consistent with other loaders.
<!--
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
344114024b
[Router] Follow symlinks and skip dots in the annotation directory loader
This commit is contained in:
commit
f9d0d3d35a
@ -40,7 +40,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
|
||||
$collection->addResource(new DirectoryResource($dir, '/\.php$/'));
|
||||
$files = iterator_to_array(new \RecursiveIteratorIterator(
|
||||
new \RecursiveCallbackFilterIterator(
|
||||
new \RecursiveDirectoryIterator($dir),
|
||||
new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
|
||||
function (\SplFileInfo $current) {
|
||||
return '.' !== substr($current->getBasename(), 0, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user