8000 bug #4012 Fix xml route configuration for routing condition (xavierbr… · symfony/symfony-docs@06f8c31 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06f8c31

Browse files
committed
bug #4012 Fix xml route configuration for routing condition (xavierbriand)
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes #4012). Discussion ---------- Fix xml route configuration for routing condition | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.4+ | Fixed tickets | #4011 Commits ------- 6790fb2 Fix xml route configuration for routing condition
2 parents 95243cd + e918a6d commit 06f8c31

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)
0