Skip to content

Commit

Permalink
[Config] don't throw on missing excluded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Feb 18, 2020
1 parent 334f020 commit 2f65a7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -110,7 +110,7 @@ private function findClasses($namespace, $pattern, $excludePattern)
$excludePrefix = null;
if ($excludePattern) {
$excludePattern = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePattern));
foreach ($this->glob($excludePattern, true, $resource) as $path => $info) {
foreach ($this->glob($excludePattern, true, $resource, true) as $path => $info) {
if (null === $excludePrefix) {
$excludePrefix = $resource->getPrefix();
}
Expand Down
Expand Up @@ -134,6 +134,13 @@ public function testRegisterClassesWithExclude()
],
array_keys($container->getAliases())
);

$loader->registerClasses(
new Definition(),
'Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\\',
'Prototype/*',
'Prototype/NotExistingDir'
);
}

public function testNestedRegisterClasses()
Expand Down

0 comments on commit 2f65a7a

Please sign in to comment.