From ec22b03b1d331fbdeafa1a292992be0342554e5d Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Thu, 19 May 2011 20:26:26 +0200 Subject: [PATCH] [Routing] Remove exception condition in YamlFileLoader::load() as its duplicating a check that is done in parseRoute() anyways. This changes allows to extend the YamlFileLoader without having to duplicate the whole method. --- src/Symfony/Component/Routing/Loader/YamlFileLoader.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index c3d641d820..15b1a753c5 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -65,10 +65,8 @@ class YamlFileLoader extends FileLoader $prefix = isset($config['prefix']) ? $config['prefix'] : null; $this->setCurrentDir(dirname($path)); $collection->addCollection($this->import($config['resource'], $type, false, $file), $prefix); - } elseif (isset($config['pattern'])) { - $this->parseRoute($collection, $name, $config, $path); } else { - throw new \InvalidArgumentException(sprintf('Unable to parse the "%s" route.', $name)); + $this->parseRoute($collection, $name, $config, $path); } }