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

Appearance settings

[Validator] add documentation for the new Timezone constraint. #11317

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 10 commits into from
Apr 7, 2019

Conversation

hhamon
Copy link
Contributor

@hhamon hhamon commented Apr 6, 2019

This is the documentation related to PR symfony/symfony#30900

@hhamon hhamon force-pushed the doc-add-timezone-validator branch from 12abdbf to b0b1498 Compare April 6, 2019 14:41
@wouterj wouterj added the ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming label Apr 6, 2019
@wouterj
Copy link
Member

wouterj commented Apr 6, 2019

Thank you for creating this documentation PR alongside your code one! Besides adding it to reference/constraints.rst, you should also add it to reference/constraints/map.rst.inc (that's the actual list rendered on symfony.com)

reference/constraints/Timezone.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Show resolved Hide resolved
@xabbuh xabbuh added this to the next milestone Apr 6, 2019
reference/constraints/Timezone.rst Show resolved Hide resolved
reference/constraints.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Outdated Show resolved Hide resolved
reference/constraints/Timezone.rst Outdated Show resolved Hide resolved

========== ======================================================================
Applies to :ref:`property or method <validation-property-target>`
Options - `groups`_
Copy link
Contributor

Choose a reason for hiding this comment

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

@symfony/team-symfony-docs do we use ordered options here and the same order for the explanations?

Copy link
Member

Choose a reason for hiding this comment

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

We didn't reorder descriptions for existing docs in the past and only sorted the table of contents to keep the diff maintainable. But here it makes sense to sort from the beginning.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean?

Ordering options like:

  1. Child class options first then inherited options?
  2. The opposite order of 1.?

Copy link
Member

Choose a reason for hiding this comment

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

@xabbuh although you are right ... for the Constraints docs we recently sorted both the list of options and their descriptions. It was a hell to fix all the conflicts, but we did it anyways :)

@hhamon
Copy link
Contributor Author

hhamon commented Apr 6, 2019

I reverted  country_code to countryCode. Options are camel cased in the other documentations (see Range for instance).

@hhamon
Copy link
Contributor Author

hhamon commented Apr 6, 2019

Thank you for creating this documentation PR alongside your code one! Besides adding it to reference/constraints.rst, you should also add it to reference/constraints/map.rst.inc (that's the actual list rendered on symfony.com)

@wouterj In which category / section shall we classify this constraint? It's not really a date time validation constraint.

@xabbuh
Copy link
Member

xabbuh commented Apr 6, 2019

I think the "Choice" category matches best (the Timezone constraint is similar to Country and Language).

@hhamon
Copy link
Contributor Author

hhamon commented Apr 6, 2019

Sounds good to me

fabpot added a commit to symfony/symfony that referenced this pull request Apr 6, 2019
…phansys)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] add new `Timezone` validation constraint

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

Rework of #22262.

Commits
-------

536e53f [Validator] add new `Timezone` validation constraint.
@xabbuh xabbuh removed the Waiting Code Merge Docs for features pending to be merged label Apr 6, 2019
@OskarStark
Copy link
Contributor

Please check Travis, maybe a rebase is needed? 🧐

@wouterj wouterj modified the milestones: next, 4.3 Apr 7, 2019
@wouterj wouterj merged commit 8e33d47 into symfony:master Apr 7, 2019
wouterj added a commit that referenced this pull request Apr 7, 2019
…onstraint. (hhamon, javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

[Validator] add documentation for the new `Timezone` constraint.

This is the documentation related to PR symfony/symfony#30900

Commits
-------

8e33d47 Fixes classification
5ec9159 Fix option
ec7bd40 Revert country_code to countryCode
9cbeb75 Fixes options list table
c5681bf Add more explanations
b37bc78 Minor fixes
d564218 Minor fixes
ac6282f Listed the geographical zones defined by PHP
135c5ff Minor fixes
b0b1498 [Validator] add documentation for the new `Timezone` constraint.
wouterj added a commit that referenced this pull request Apr 7, 2019
@wouterj
Copy link
Member

wouterj commented Apr 7, 2019

Thank you for your docs PR @hhamon! I've added a versionadded block in 0cba12e, but apart from the docs are perfect!


class UserSettings
{
protected $timezone;
Copy link
Contributor

Choose a reason for hiding this comment

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

If I am correct, this should be removed as it is not added in other constraints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Status: Reviewed Validator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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