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

addGlobalIgnoredName not working #78

Closed
dlip opened this issue Apr 11, 2013 · 1 comment
Closed

addGlobalIgnoredName not working #78

dlip opened this issue Apr 11, 2013 · 1 comment

Comments

@dlip
Copy link

dlip commented Apr 11, 2013

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.

@schmittjoh
Copy link
Owner

I cannot help you here. Maybe it's a Doctrine issue, but it seems more like an error on your end.

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