Skip to content

Commit

Permalink
[Routing] make path required again in the xsd
Browse files Browse the repository at this point in the history
pattern was previously also required, see 5082994#diff-4
  • Loading branch information
Tobion committed Jan 31, 2015
1 parent 82d54fa commit f939fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/Loader/XmlFileLoader.php
Expand Up @@ -113,7 +113,7 @@ public function supports($resource, $type = null)
*/
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 <route> element in file "%s" must have an "id" and a "path" attribute.', $path));
}

Expand Down
Expand Up @@ -37,7 +37,7 @@
<xsd:group ref="configs" minOccurs="0" maxOccurs="unbounded" />

<xsd:attribute name="id" type="xsd:string" use="required" />
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="path" type="xsd:string" use="required" />
<xsd:attribute name="host" type="xsd:string" />
<xsd:attribute name="schemes" type="xsd:string" />
<xsd:attribute name="methods" type="xsd:string" />
Expand Down

0 comments on commit f939fea

Please sign in to comment.