Skip to content

Commit e918a6d

Browse files
xavierbriandweaverryan
authored andcommitted
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 95243cd commit e918a6d

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
@@ -758,11 +758,9 @@ can be extended to have an almost infinite flexibility using ``conditions``:
758758
xsi:schemaLocation="http://symfony.com/schema/routing
759759
http://symfony.com/schema/routing/routing-1.0.xsd">
760760
761-
<route id="contact"
762-
path="/contact"
763-
condition="context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'"
764-
>
761+
<route id="contact" path="/contact">
765762
<default key="_controller">AcmeDemoBundle:Main:contact</default>
763+
<condition>context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'</condition>
766764
</route>
767765
</routes>
768766

0 commit comments

Comments
 (0)