Skip to content
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

Merged
merged 1 commit into from
Sep 21, 2016

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 19, 2016

@nicolas-grekas nicolas-grekas force-pushed the route-unicode branch 2 times, most recently from b2154f8 to c53742f Compare August 19, 2016 09:16
@nicolas-grekas nicolas-grekas changed the title Add doc about unicode requirements [Routing] Add doc about unicode requirements Aug 19, 2016
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``).

Copy link
Member

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.

@nicolas-grekas nicolas-grekas force-pushed the route-unicode branch 3 times, most recently from d2af1c2 to e129c00 Compare August 25, 2016 09:35
fabpot added a commit to symfony/symfony that referenced this pull request Aug 25, 2016
…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
symfony-splitter pushed a commit to symfony/routing that referenced this pull request Aug 25, 2016
…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
@javiereguiluz
Copy link
Member

👍

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

@xabbuh
Copy link
Member

xabbuh commented Sep 21, 2016

Thank you @nicolas-grekas.

@xabbuh xabbuh merged commit 75ed392 into symfony:master Sep 21, 2016
xabbuh added a commit that referenced this pull request Sep 21, 2016
…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
@nicolas-grekas nicolas-grekas deleted the route-unicode branch September 23, 2016 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants