Skip to content

Clarify the mappings that require no method prefix. #7131

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

Closed
wants to merge 2 commits into from

Conversation

richsage
Copy link
Contributor

On the Validation page, there is a section about "getter" constraints. In the note it wasn't clear about where the prefix should be dropped, given that the example annotation constraints doesn't include any method specifics. This PR clarifies that.

("get", "is" or "has") is omitted in the mapping. This allows you to move
the constraint to a property with the same name later (or vice versa)
without changing your validation logic.
("get", "is" or "has") is omitted in the mappings for YAML, XML and PHP.
Copy link
Member

Choose a reason for hiding this comment

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

I would change this a bit to "[...] is omitted in the mappings for the YAML, XML and PHP format."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will do. Do you want a separate "change" commit or happy for it to be merged into the existing single one?

Copy link
Member

Choose a reason for hiding this comment

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

You can do what fits your workflow best. :) We have a nice tool that allows use to squash commits during merging PRs.

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't matter because we use a tool that squashes everything automatically, so your pull request will be merged as a single commit :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great! I'll push a revision then and let your magic tool do the job for me :-)

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.

👍

@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2016

Thank you @richsage.

xabbuh added a commit that referenced this pull request Nov 28, 2016
…sage)

This PR was squashed before being merged into the 2.7 branch (closes #7131).

Discussion
----------

Clarify the mappings that require no method prefix.

On the Validation page, there is a section about "getter" constraints. In the note it wasn't clear about where the prefix should be dropped, given that the example annotation constraints doesn't include any method specifics. This PR clarifies that.

Commits
-------

e82c918 Clarify the mappings that require no method prefix.
@xabbuh xabbuh closed this Nov 28, 2016
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.

4 participants