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

Check for broken serialization metadata mappings #534

Closed
markri opened this issue Nov 18, 2016 · 3 comments
Closed

Check for broken serialization metadata mappings #534

markri opened this issue Nov 18, 2016 · 3 comments
Labels
Milestone

Comments

@markri
Copy link

markri commented Nov 18, 2016

I just got my self in a very long debug session, trying to found out why my YAML (but will also apply for XML i guess) mapping wasn't applied on serialization. Finally it became clear that my mapping file just wasn't found and therefore simply skipped. And no single layer reporting about it.

The strict naming is a good thing, however it now results in quite some harsh results.
Looking at following config

jms_serializer:
    metadata:
        directories:
            my_models:
                namespace_prefix: "Customer\\Project\\Domain"
                path: "@CustomerProjectBundle/Resources/config/serializer"

Isn't it a good idea to test for all available configs in that directory to test for unmapped entities? This way it will become clear very quickly that a mapping is skipped and should be fixed. Also when someone refactors a model to a different name, than the developer isnt notified of broken serialization (which was there before).

@sanderfreshheads
Copy link

Thnx! I had a similar problem. A typo in my path config had me debugging my code for over 2 hours!!!

@ahilles107
Copy link

Hey, for us it was BC break ;) But good one as we had left in config not used anymore path. Thanks for developing that bundle!

@goetas
Copy link
Collaborator

goetas commented Jun 8, 2017

Was mentioned in the UPGRADING.md

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

Successfully merging a pull request may close this issue.

4 participants