Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2af1c2

Browse files
Add doc about unicode requirements
1 parenta7f704c commitd2af1c2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎routing/requirements.rst‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ Path Parameters
159159
``/es`` *won't match this route*
160160
======= ========================
161161

162+
..note::
163+
164+
Since Symfony 3.2, you can enable UTF-8 route matching by enabling the `utf8`
165+
parameter 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 flag is automatically enabled whenever a route or a requirement use 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 insteand in 4.0 unless you explicitly turn
171+
on the `utf8` parameter.
172+
162173
..tip::
163174

164175
The route requirements can also include container parameters, as explained
@@ -287,3 +298,5 @@ Adding Dynamic Requirements with Expressions
287298

288299
For really complex requirements, you can use dynamic expressions to match *any*
289300
information on the request. See:doc:`/routing/conditions`.
301+
302+
.. _`PCRE Unicode property`:http://php.net/manual/en/regexp.reference.unicode.php

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp