Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for multiple exclusion strategies #39

Closed
Narretz opened this issue Feb 18, 2013 · 1 comment
Closed

Support for multiple exclusion strategies #39

Narretz opened this issue Feb 18, 2013 · 1 comment

Comments

@Narretz
Copy link

Narretz commented Feb 18, 2013

This has been discussed in schmittjoh/JMSSerializerBundle#140, but it mainly belongs here now.

My personal use case for multiple exclusion strategies: I'd like to use Groups with the proposed DepthExclusion strategy (#4). Restrict the properties that are serialized, and restrict the depth to which some properties are serialized. I need both for that. Strategies really complement each other; the same is true for e.g. groups and version.

The issue mainly dealed with three changes:

  1. Adding a serializer builder service that separates the new settings for each invocation => Builder exists
  2. The option to configure specific serializers in the config files => would go to SerializerBundle
  3. Changes to Groups => Default Groups are there, I think that was it
  4. A new option to have a chain of exclusion strategies instead of a single one

Is there still demand for this?
Looks like the builder doesn't have support for setting (multiple) exclusion strategies yet. So it looks like we'd need to do that and 4.). Or has this been accomplished some other way?

@Narretz
Copy link
Author

Narretz commented Feb 19, 2013

Okay, I tried to rebase Seldaek's latest commits (just 5 months old) onto master, but it doesn't play well with the current builder. I assume you could add public methods to the builder similar to configureEventHandlers, addMetadataDirs etc. that set the exclusion strategies. Not sure if you would still need to add some sort of ChainExclusionStrategy, though.

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

No branches or pull requests

2 participants