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 while parsing annotations between patch-versions #113

Closed
trogwarz opened this issue Feb 13, 2020 · 6 comments · Fixed by #114
Closed

Semantical error while parsing annotations between patch-versions #113

trogwarz opened this issue Feb 13, 2020 · 6 comments · Fixed by #114

Comments

@trogwarz
Copy link

trogwarz commented Feb 13, 2020

Hello!

I've upgraded this library from 1.7.2 to 1.7.4 and see errors like "The annotation "@template" in class MyCLabs\Enum\Enum was never imported. Did you maybe forget to add a "use" statement for this annotation?". Using php:7.3.14 and symfony:4.4.*.

How to fix that? Hardcode myclabs/php-enum:1.7.2 version? Or, BC changes need to raise major version? Or, require some additional package like psalm (don't know anything about it)?

@mnapoli
Copy link
Member

mnapoli commented Feb 13, 2020

Thank you for the report. I have just opened doctrine/annotations#308 to ask for clarification from the Doctrine team on what should be done here.

@andrew-demb
Copy link

Which version of doctrine/annotations are you using?

@trogwarz
Copy link
Author

trogwarz commented Feb 13, 2020

Which version of doctrine/annotations are you using?

@andrew-demb, i don't use them directly but some packages installed v1.8.0 as i can see by composer -i.

@mnapoli
Copy link
Member

mnapoli commented Feb 13, 2020

Per doctrine/annotations#308 we should probably prefix @template annotations with @psalm-.

@jarstelfox
Copy link
Contributor

Opened #114 which should be the fix.

@mnapoli or @trogwarz could you possible test my change

@trogwarz
Copy link
Author

@jarstelfox, thanks for the update! Upgrading myclabs/php-enum to 1.7.6 solves problem.

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

Successfully merging a pull request may close this issue.

4 participants