8000 feature #21854 [Router] Follow symlinks and skip dots in the annotati… · symfony/symfony@f9d0d3d · GitHub
[go: up one dir, main page]

Skip to content

Commit f9d0d3d

Browse files
committed
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 ------- 3441140 [Router] Follow symlinks and skip dots in the annotation directory loader
2 parents 119087a + 3441140 commit f9d0d3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function load($path, $type = null)
4040
$collection->addResource(new DirectoryResource($dir, '/\.php$/'));
4141
$files = iterator_to_array(new \RecursiveIteratorIterator(
4242
new \RecursiveCallbackFilterIterator(
43-
new \RecursiveDirectoryIterator($dir),
43+
new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
4444
function (\SplFileInfo $current) {
4545
return '.' !== substr($current->getBasename(), 0, 1);
4646
}

0 commit comments

Comments
 (0)
0