Skip to content

Navigation Menu

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

Appearance settings

[Validator] Add docs for "canonicalize" option at Locale validation constraint #9248

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

Merged
merged 3 commits into from
Feb 23, 2018

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Feb 12, 2018

@phansys phansys force-pushed the pr_26075 branch 2 times, most recently from 432ed07 to 0761ea9 Compare February 12, 2018 01:32
@phansys phansys changed the title Add docs for "canonicalize" option at Locale validation constraint [Validator] Add docs for "canonicalize" option at Locale validation constraint Feb 12, 2018
@javiereguiluz javiereguiluz added the Waiting Code Merge Docs for features pending to be merged label Feb 12, 2018
@javiereguiluz javiereguiluz removed the Waiting Code Merge Docs for features pending to be merged label Feb 20, 2018
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for this contribution @phansys (and thanks for implementing the feature too). I left some minor comments.

**type**: ``boolean`` **default**: ``false``

.. versionadded:: 4.1
Using this option with value `false` was deprecated in Symfony 4.1 and it will
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this versionadded directive, the false and false code have single backticks but the RST format requires double backticks

Using this option with value `false` was deprecated in Symfony 4.1 and it will
throw an exception in Symfony 5.0, use `true` instead.

If true, then the :phpmethod:`Locale::canonicalize` method will be applied to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If true, then the ... -> If true, the ... ?

Using this option with value `false` was deprecated in Symfony 4.1 and it will
throw an exception in Symfony 5.0, use `true` instead.

If true, then the :phpmethod:`Locale::canonicalize` method will be applied to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied to before... -> applied before...

throw an exception in Symfony 5.0, use `true` instead.

If true, then the :phpmethod:`Locale::canonicalize` method will be applied to
before checking the validity of the given locale.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a simple example at the end of this phrase for those who don't fully understand what "canonicalize" means or does. Example:

... before checking the validity of the given locale (e.g. ``FR-fr.utf8``
is transformed into ``fr_FR``).

@phansys
Copy link
Contributor Author

phansys commented Feb 20, 2018

Your comments were addressed, thank you @javiereguiluz!

@javiereguiluz javiereguiluz added this to the 4.1 milestone Feb 23, 2018
@javiereguiluz
Copy link
Member

Thanks Javier.

@javiereguiluz javiereguiluz merged commit 14f10bc into symfony:master Feb 23, 2018
javiereguiluz added a commit that referenced this pull request Feb 23, 2018
…` validation constraint (phansys, javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

[Validator] Add docs for "canonicalize" option at `Locale` validation constraint

Related to symfony/symfony#22353, symfony/symfony#26075.

Closes #7660.

Commits
-------

14f10bc Final changes
4c28e1f Minor changes
0cc4ee8 Add docs for "canonicalize" option at `Locale` validation constraint
@phansys phansys deleted the pr_26075 branch February 23, 2018 11:31
xabbuh added a commit to xabbuh/symfony-docs that referenced this pull request Feb 23, 2018
javiereguiluz added a commit that referenced this pull request Feb 23, 2018
This PR was merged into the master branch.

Discussion
----------

[#9248] some minor tweaks

Commits
-------

cf9833c [#9248] some minor tweaks
aaa2000 pushed a commit to aaa2000/symfony that referenced this pull request Sep 24, 2018
…n constraint without setting "canonicalize" option to `true` (phansys)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[Validator] Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true`

|Q            |A        |
|---          |---      |
|Branch       |master   |
|Bug fix?     |no       |
|New feature? |no       |
|BC breaks?   |no       |
|Deprecations?|yes      |
|Tests pass?  |yes      |
|Fixed tickets|symfony#22353   |
|License      |MIT      |
|Doc PR       |symfony/symfony-docs#9248|

See symfony#22353 (comment).

Commits
-------

1572540 Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true`
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.