diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 37c94f59ee..978aa64783 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -56,7 +56,7 @@ class XmlFileLoader extends FileLoader $type = (string) $node->getAttribute('type'); $prefix = (string) $node->getAttribute('prefix'); $this->currentDir = dirname($path); - $collection->addCollection($this->import($file, $type), $prefix); + $collection->addCollection($this->import($resource, $type), $prefix); break; default: throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName)); diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index 00d9ef67ac..cb39b06aff 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -57,7 +57,7 @@ class YamlFileLoader extends FileLoader $type = isset($config['type']) ? $config['type'] : null; $prefix = isset($config['prefix']) ? $config['prefix'] : null; $this->currentDir = dirname($path); - $collection->addCollection($this->import($file, $type), $prefix); + $collection->addCollection($this->import($config['resource'], $type), $prefix); } elseif (isset($config['pattern'])) { $this->parseRoute($collection, $name, $config, $path); } else {