diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 6c52c47b65..3a72208c3e 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -243,7 +243,9 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } do { - $this->addResource(new FileResource($class->getFileName())); + if (is_file($class->getFileName())) { + $this->addResource(new FileResource($class->getFileName())); + } } while ($class = $class->getParentClass()); return $this; diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/bar.xml b/src/Symfony/Component/Routing/Tests/Fixtures/bar.xml new file mode 100644 index 0000000000..e69de29bb2