Closed cywbl closed 2 years ago
Resolved! Elsewhere in the class, there was an annotation like this:
@JMS\Groups("Details")
And it needed to be fixed like this:
@JMS\Groups({"Details"})
Closing this issue, but I wonder I can help update the JMS docs to make it clearer that it must always take a list, never just a string https://jmsyst.com/libs/serializer/master/reference/annotations#groups
Hi, I am using JMS Serializer with FOS REST Bundle... And I cannot figure out what is causing this warning when I run my phpunit tests...
I've checked the library versions (fos rest bundle 3.2, jms serializer-bundle 3.5) and the documentation for both, and cannot figure out what is going wrong. Inside the entity to be serialized, the annotations look like this for example:
And inside the controller, using it like this:
The last line there (handleView) is what is ostensibly triggering the warning. Please help :disappointed: