Jump to content

How to use serialization groups?


Recommended Posts

I use serialization groups with \@Group  annotation like docs says https://symfony.com/doc/3.4/serializer.html

But my entity is also loaded in front... and it doesn't work there

 

Quote

PHP Fatal error:  Uncaught Doctrine\\Common\\Annotations\\AnnotationException: [Semantical Error] The annotation "@Symfony\\Component\\Serializer\\Annotation\\Groups" in property My\\Cool\\Entity\\Entity::$id does not exist, or could not be auto-loaded.
 

 

I need annotations in backend only so I have tried with serializaiton.yml file placed in module/config/serialization.yml or module/config/admin/serialization.yml but both doesn't work - looks like presta doesn't load it.

How to fix fatal error or force presta to load config from yaml?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...