8000 Import passing the correct type · symfony/symfony@e2abd65 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2abd65

Browse files
committed
Import passing the correct type
1 parent 61619ce commit e2abd65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function load(mixed $resource, string $type = null): ?RouteCollection
4343
return new RouteCollection();
4444
}
4545

46-
return $this->loadFromDirectory($path, trim($resource['namespace'], '\\'));
46+
return $this->loadFromDirectory($path, trim($resource['namespace'], '\\'), $type);
4747
}
4848

4949
public function supports(mixed $resource, string $type = null): bool
@@ -59,7 +59,7 @@ public function forDirectory(string $currentDirectory): static
5959
return $loader;
6060
}
6161

62-
private function loadFromDirectory(string $directory, string $psr4Prefix): RouteCollection
62+
private function loadFromDirectory(string $directory, string $psr4Prefix, string $type): RouteCollection
6363
{
6464
$collection = new RouteCollection();
6565
$collection->addResource(new DirectoryResource($directory, '/\.php$/'));
@@ -92,7 +92,7 @@ function (\SplFileInfo $current) {
9292
continue;
9393
}
9494

95-
$collection->addCollection($this->import($class, 'attribute'));
95+
$collection->addCollection($this->import($class, $type));
9696
}
9797

9898
return $collection;

0 commit comments

Comments
 (0)
0