8000 [Router] Follow symlinks and skip dots in the annotation directory lo… · symfony/symfony@3441140 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3441140

Browse files
committed
[Router] Follow symlinks and skip dots in the annotation directory loader
This will make it consistent with other loaders.
1 parent 119087a commit 3441140

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