You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the serializer in an external project with entities from a symfony project, but my entities have doctrine orm mappings on them so i tried to use AnnotationReader::addGlobalIgnoredName to ignore them. For some reason when I call $serializer->serialize() the names I set to ignore are not set in Doctrine's DocParser.php.
AnnotationReader::addGlobalIgnoredName('ORM\\MappedSuperclass');
$serializer = JMS\Serializer\SerializerBuilder::create()->build();
$artist = new Artist();
$artist->setName('Test artist');
$jsonContent = $serializer->serialize($artist, 'json'); // ORM\\MappedSuperclass not found
If I var_dump $this->ignoredAnnotationNames in DocParser::Annotation() it seems to get hit twice, but the first time the array is empty.
The text was updated successfully, but these errors were encountered:
I'm trying to use the serializer in an external project with entities from a symfony project, but my entities have doctrine orm mappings on them so i tried to use AnnotationReader::addGlobalIgnoredName to ignore them. For some reason when I call $serializer->serialize() the names I set to ignore are not set in Doctrine's DocParser.php.
If I var_dump $this->ignoredAnnotationNames in DocParser::Annotation() it seems to get hit twice, but the first time the array is empty.
The text was updated successfully, but these errors were encountered: