bug #35772 [Config] don't throw on missing excluded paths (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] don't throw on missing excluded paths
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
2f65a7a255
[Config] don't throw on missing excluded paths
This commit is contained in:
commit
212841b3e6
@ -110,7 +110,7 @@ abstract class FileLoader extends BaseFileLoader
|
||||
$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();
|
||||
}
|
||||
|
@ -134,6 +134,13 @@ class FileLoaderTest extends TestCase
|
||||
],
|
||||
array_keys($container->getAliases())
|
||||
);
|
||||
|
||||
$loader->registerClasses(
|
||||
new Definition(),
|
||||
'Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\\',
|
||||
'Prototype/*',
|
||||
'Prototype/NotExistingDir'
|
||||
);
|
||||
}
|
||||
|
||||
public function testNestedRegisterClasses()
|
||||
|
Reference in New Issue
Block a user