Skip to content

Commit 6790fb2

Browse files
committed
Fix xml route configuration for routing condition
Current XML documentation doesn't respect routing schema (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd)
1 parent 2ae4f34 commit 6790fb2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

book/routing.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,9 @@ can be extended to have an almost infinite flexibility using ``conditions``:
747747
xsi:schemaLocation="http://symfony.com/schema/routing
748748
http://symfony.com/schema/routing/routing-1.0.xsd">
749749
750-
<route id="contact"
751-
path="/contact"
752-
condition="context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'"
753-
>
750+
<route id="contact" path="/contact">
754751
<default key="_controller">AcmeDemoBundle:Main:contact</default>
752+
<condition>context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'</condition>
755753
</route>
756754
</routes>
757755

0 commit comments

Comments
 (0)