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

how to set a custom normalizer for a 3rd party class that matches the native normalizer #9

Closed
lsmith77 opened this issue Jun 6, 2011 · 2 comments

Comments

@lsmith77
Copy link
Contributor

lsmith77 commented Jun 6, 2011

If I have a ConstraintViolationList instance if there some way to still be able to use a custom normalizer? The issue is that ConstraintViolationList implements \Traversable, which triggers the native php normalizer. Furthermore the class is defined by a 3rd party meaning there is no way to add annotations to it directly (or easily).

@schmittjoh
Copy link
Owner

I think we probably need to move the custom normalizers before the phptype
normalizer.

On Tue, Jun 7, 2011 at 12:38 AM, lsmith77 <
[email protected]>wrote:

If I have a ConstraintViolationList instance if there some way to still be
able to use a custom normalizer? The issue is that ConstraintViolationList
implements \Traversable, which triggers the native php normalizer.
Furthermore the class is defined by a 3rd party meaning there is no way to
add annotations to it directly (or easily).

Reply to this email directly or view it on GitHub:
https://github.com/schmittjoh/SerializerBundle/issues/9

@lsmith77
Copy link
Contributor Author

lsmith77 commented Jun 7, 2011

yeah, its kind of a pitty because in many cases it will increase the overhead, but i dont see a way around this if the end user should remain in control. that being said the end user can also place the native normalizer into the list of normalizers with a specific priority. i will send a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants