From f939fea5438983bc296c0b8da705ffe3aabd2c0a Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Sat, 31 Jan 2015 21:19:47 +0100 Subject: [PATCH] [Routing] make path required again in the xsd pattern was previously also required, see https://github.com/symfony/symfony/commit/508299400d7fe6f6222a32d5e527d988bb307dcb#diff-4 --- src/Symfony/Component/Routing/Loader/XmlFileLoader.php | 2 +- .../Component/Routing/Loader/schema/routing/routing-1.0.xsd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 9519299841..1fb04dd2bc 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -113,7 +113,7 @@ class XmlFileLoader extends FileLoader */ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $path) { - if ('' === ($id = $node->getAttribute('id')) || (!$node->hasAttribute('pattern') && !$node->hasAttribute('path'))) { + if ('' === ($id = $node->getAttribute('id')) || !$node->hasAttribute('path')) { throw new \InvalidArgumentException(sprintf('The element in file "%s" must have an "id" and a "path" attribute.', $path)); } diff --git a/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd b/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd index 19b400540e..8090c784c1 100644 --- a/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd +++ b/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd @@ -37,7 +37,7 @@ - +