[Routing] make path required again in the xsd
pattern was previously also required, see 508299400d (diff-4)
This commit is contained in:
parent
82d54fac8c
commit
f939fea543
@ -113,7 +113,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
*/
|
*/
|
||||||
protected function parseRoute(RouteCollection $collection, \DOMElement $node, $path)
|
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));
|
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" must have an "id" and a "path" attribute.', $path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<xsd:group ref="configs" minOccurs="0" maxOccurs="unbounded" />
|
<xsd:group ref="configs" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
|
||||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
<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="host" type="xsd:string" />
|
||||||
<xsd:attribute name="schemes" type="xsd:string" />
|
<xsd:attribute name="schemes" type="xsd:string" />
|
||||||
<xsd:attribute name="methods" type="xsd:string" />
|
<xsd:attribute name="methods" type="xsd:string" />
|
||||||
|
Reference in New Issue
Block a user