bug #17672 [DependencyInjection][Routing] add files used in FileResource objects (xabbuh)
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection][Routing] add files used in FileResource objects
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17598#discussion_r51756307
| License | MIT
| Doc PR |
Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
Commits
-------
4f865c7
add files used in FileResource objects
This commit is contained in:
commit
876bad9730
@ -243,7 +243,9 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$this->addResource(new FileResource($class->getFileName()));
|
if (is_file($class->getFileName())) {
|
||||||
|
$this->addResource(new FileResource($class->getFileName()));
|
||||||
|
}
|
||||||
} while ($class = $class->getParentClass());
|
} while ($class = $class->getParentClass());
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Reference in New Issue
Block a user