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

[Semantical Error] The annotation \"@generated\" in class JMS\\Serializer\\Type\\InnerParser was never imported #1046

Closed
andig opened this issue Feb 24, 2019 · 4 comments

Comments

@andig
Copy link
Contributor

andig commented Feb 24, 2019

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

Steps required to reproduce the problem

I'm running something like this inside a larger non-Symfony application:

AnnotationRegistry::registerLoader('class_exists');

$serializer = SerializerBuilder::create()->build();
$json = $serializer->serialize($request, 'json');

I'm using

"jms/serializer": "^2.1",

Expected Result

No exception inside JMS code. I do not expect to load any Annotations for library-internal usage unless they apply to my model.

Actual Result

AnnotationException
[Semantical Error] The annotation \"@generated\" in class JMS\\Serializer\\Type\\InnerParser was never imported. Did you maybe forget to add a \"use\" statement for this annotation?

The code in question in InnerParser is:

/**
 * @internal
 *
 * @generated Use regenerate-parser.php to refresh this class.
 */
@andig andig closed this as completed Feb 24, 2019
@fabiante
Copy link

fabiante commented Mar 7, 2021

@andig Why did you close this? How was this issue resolved? Having similar problems here ...

@fabiante
Copy link

Looks like this is an issue not being adressed: #1185

@goetas
Copy link
Collaborator

goetas commented Mar 21, 2021

2.x is abandoned, in 3.x the InnerParser has been dropped, this this problem is gone

@fabiante
Copy link

Oh, thank you for the note!

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

3 participants