diff vendor/symfony/routing/Router.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/routing/Router.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/vendor/symfony/routing/Router.php	Mon Apr 23 09:46:53 2018 +0100
@@ -84,8 +84,6 @@
     private $expressionLanguageProviders = array();
 
     /**
-     * Constructor.
-     *
      * @param LoaderInterface $loader   A LoaderInterface instance
      * @param mixed           $resource The main resource to load
      * @param array           $options  An array of options
@@ -228,8 +226,6 @@
 
     /**
      * Sets the ConfigCache factory to use.
-     *
-     * @param ConfigCacheFactoryInterface $configCacheFactory The factory to use
      */
     public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory)
     {
@@ -306,7 +302,9 @@
             }
         );
 
-        require_once $cache->getPath();
+        if (!class_exists($this->options['matcher_cache_class'], false)) {
+            require_once $cache->getPath();
+        }
 
         return $this->matcher = new $this->options['matcher_cache_class']($this->context);
     }
@@ -338,7 +336,9 @@
                 }
             );
 
-            require_once $cache->getPath();
+            if (!class_exists($this->options['generator_cache_class'], false)) {
+                require_once $cache->getPath();
+            }
 
             $this->generator = new $this->options['generator_cache_class']($this->context, $this->logger);
         }