From 4f865c758ae5c4fc1c320a032c7b7e008418e34c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 3 Feb 2016 18:21:36 +0100 Subject: [PATCH] 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. --- .../Component/DependencyInjection/ContainerBuilder.php | 4 +++- src/Symfony/Component/Routing/Tests/Fixtures/bar.xml | 0 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Component/Routing/Tests/Fixtures/bar.xml diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 6c52c47b651a9..3a72208c3e3b8 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -243,7 +243,9 @@ public function addClassResource(\ReflectionClass $class) } 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 0000000000000..e69de29bb2d1d pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy