Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f865c7

Browse filesBrowse files
committed
add files used in FileResource objects
Starting with Symfony 3.1, the constructor of the `FileResource` class will throw an exception when the passed file does not exist.
1 parent a842eda commit 4f865c7
Copy full SHA for 4f865c7

File tree

2 files changed

+3
-1
lines changed
Filter options

2 files changed

+3
-1
lines changed

‎src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/ContainerBuilder.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ public function addClassResource(\ReflectionClass $class)
243243
}
244244

245245
do {
246-
$this->addResource(new FileResource($class->getFileName()));
246+
if (is_file($class->getFileName())) {
247+
$this->addResource(new FileResource($class->getFileName()));
248+
}
247249
} while ($class = $class->getParentClass());
248250

249251
return $this;

‎src/Symfony/Component/Routing/Tests/Fixtures/bar.xml

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Tests/Fixtures/bar.xml
Whitespace-only changes.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.