-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Add support for is.* methods in GetSetMethodNormalizer #10297
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
Comments
I also find it useful, that's why I created a PR. Link above. |
Ho great, I should have sent one instead of asking :-) I close this one |
fabpot
added a commit
that referenced
this issue
Mar 3, 2014
…ethodNormalizer (tiraeth) This PR was squashed before being merged into the 2.5-dev branch (closes #10314). Discussion ---------- [Serializer] added support for is.* methods in GetSetMethodNormalizer | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10297 | License | MIT | Doc PR | N/A Using ``is`` prefix for boolean variables is considered a standard, not only in PHP but also in Java (from which Symfony2 derives lot standards). I was not sure if this is BCB but answered "no". Was not sure if I should update ``CHANGELOG`` file and did so, but if you find it irrelevant, go ahead and merge without it. I don't know if I should create a PR for docs because it does not explicitly say that the normalizer supports only ``get.*`` methods as getters. _Note: Objects that contain behaviour also can use other prefixes like ``can``, ``has``, ``should``, but their presence in ``GetSetMethodNormalizer`` is relevant as they do not provide state (``has`` is debatable)._ Commits ------- 480219f [Serializer] added support for is.* methods in GetSetMethodNormalizer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Shouldn't the
GetSetMethodNormalizer
also support "issers" ?For example I have a class with methods name
setVerified
/isVerified
, and the normalizer ignores them.I think naming the methods
setIsVerified
/getIsVerified
is ugly :-)I can send a pull request for that.
The text was updated successfully, but these errors were encountered: