File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,17 @@ Path Parameters
159
159
``/es `` *won't match this route *
160
160
======= ========================
161
161
162
+ .. note ::
163
+
164
+ Since Symfony 3.2, you can enable UTF-8 route matching by setting the ``utf8 ``
165
+ option when declaring or importing routes. This will make e.g. a ``. `` in
166
+ requirements match any UTF-8 characters instead of just a single byte.
167
+ The option is automatically enabled whenever a route or a requirement uses any
168
+ non-ASCII UTF-8 characters or a `PCRE Unicode property `_ (``\p{xx} ``,
169
+ ``\P{xx} `` or ``\X ``). Note that this behavior is deprecated and a
170
+ `LogicException ` will be thrown instead in 4.0 unless you explicitly turn
171
+ on the `utf8 ` option.
172
+
162
173
.. tip ::
163
174
164
175
The route requirements can also include container parameters, as explained
@@ -287,3 +298,5 @@ Adding Dynamic Requirements with Expressions
287
298
288
299
For really complex requirements, you can use dynamic expressions to match *any *
289
300
information on the request. See :doc: `/routing/conditions `.
301
+
302
+ .. _`PCRE Unicode property` : http://php.net/manual/en/regexp.reference.unicode.php
You can’t perform that action at this time.
0 commit comments