diff vendor/symfony/dependency-injection/Loader/IniFileLoader.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php	Mon Apr 23 09:46:53 2018 +0100
@@ -11,7 +11,6 @@
 
 namespace Symfony\Component\DependencyInjection\Loader;
 
-use Symfony\Component\Config\Resource\FileResource;
 use Symfony\Component\Config\Util\XmlUtils;
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
 
@@ -29,7 +28,7 @@
     {
         $path = $this->locator->locate($resource);
 
-        $this->container->addResource(new FileResource($path));
+        $this->container->fileExists($path);
 
         // first pass to catch parsing errors
         $result = parse_ini_file($path, true);
@@ -52,7 +51,15 @@
      */
     public function supports($resource, $type = null)
     {
-        return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION);
+        if (!is_string($resource)) {
+            return false;
+        }
+
+        if (null === $type && 'ini' === pathinfo($resource, PATHINFO_EXTENSION)) {
+            return true;
+        }
+
+        return 'ini' === $type;
     }
 
     /**