-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Routing] Add doc about unicode requirements #6890
Conversation
b2154f8
to
c53742f
Compare
of just a single byte. Unicode matching is also automatically enabled | ||
whenever the route or a requirement contains a non-ASCII UTF-8 character or | ||
a `PCRE Unicode property`_ (``\p{xx}``, ``\P{xx}`` or ``\X``). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an example with the *
prefix to make things real clear.
d2af1c2
to
e129c00
Compare
…s (nicolas-grekas) This PR was merged into the 3.2-dev branch. Discussion ---------- [Routing] Add seamless support for unicode requirements | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #3629, #5236, #19562 | License | MIT | Doc PR | symfony/symfony-docs#6890 This PR adds unicode support to route matching and generation by automatically adding the `u` modifier to regexps that use either unicode characters or unicode enabled character classes (e.g. `\p...` `\x{...}` `\X`). As a side note, if one wants to match a single unicode character (vs a single byte), one should use `\PM` or `\X` instead of `.` *or* set the `unicode` parameter to true. Commits ------- a829d34 [Routing] Add seamless support for unicode requirements
…s (nicolas-grekas) This PR was merged into the 3.2-dev branch. Discussion ---------- [Routing] Add seamless support for unicode requirements | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #3629, #5236, #19562 | License | MIT | Doc PR | symfony/symfony-docs#6890 This PR adds unicode support to route matching and generation by automatically adding the `u` modifier to regexps that use either unicode characters or unicode enabled character classes (e.g. `\p...` `\x{...}` `\X`). As a side note, if one wants to match a single unicode character (vs a single byte), one should use `\PM` or `\X` instead of `.` *or* set the `unicode` parameter to true. Commits ------- a829d34 [Routing] Add seamless support for unicode requirements
👍 Status: reviewed A fantastic feature and perfectly documented! Thanks @nicolas-grekas (Note: there are some minor formatting issues in this commit: in RST, code literals must be wrapped with double backticks instead of Markdown's single backticks). |
e129c00
to
75ed392
Compare
Thank you @nicolas-grekas. |
…rekas) This PR was merged into the master branch. Discussion ---------- [Routing] Add doc about unicode requirements Ref. symfony/symfony#19604 Commits ------- 75ed392 Add doc about unicode requirements
Ref. symfony/symfony#19604