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

[v3] Rework Populator #328

Closed
theofidry opened this issue May 2, 2016 · 6 comments
Closed

[v3] Rework Populator #328

theofidry opened this issue May 2, 2016 · 6 comments
Milestone

Comments

@theofidry
Copy link
Member

While reviewing the populator, if I got things right, most of it is simply creating populated objects from the set of property/value got from the Fixture. But instead of doing it ourself, maybe we could make use of Symfony Serializer instead? Pretty sure it would already handle most of our use case and it would always be possible to add customer denormalizers to handle most custom work.

If we do so, I think that would remove a fair bit of code from alice, which is always nice. Besides I think it would be more performant as well.

@tshelburne WDYT?

@tshelburne
Copy link
Collaborator

I think this makes sense - the Symfony Serializer is also much more likely to get bug fixes / etc. Generally I try to reduce the number of dependencies, but this feels like a smart one.

@tshelburne
Copy link
Collaborator

My only question - does Serializer rely on annotated classes? We don't want to introduce anything that suddenly takes us back to "you must use Symfony" territory.

@theofidry
Copy link
Member Author

does Serializer rely on annotated classes?

Could you give an example? I'm not sure to have the same definition of annotated classes :P

We don't want to introduce anything that suddenly takes us back to "you must use Symfony" territory.

Never, I don't want alice to become a Symfony bundle, that would be awful.

@tshelburne
Copy link
Collaborator

I mean does Serializer look to the class for Doctrine-style ORM annotations or anything like that.

@theofidry
Copy link
Member Author

Nope, it uses reflection by default and if needed we can register custom denormalizers.

@theofidry theofidry added this to the 3.x milestone May 4, 2016
@theofidry
Copy link
Member Author

Closing as will deal with it in #265

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