Answer the question
In order to leave comments, you need to log in
How to allow annotations in PhpStorm 2020.3.3?
PhpStorm 2020.3.3 marks imported classes as unused even if they are used in annotations.
I'm using Symfony 5.2 + api-platform/api-pack which installed doctrine/annotations ^1.0 where PHP 8 attributes are not supported.
I understand it's possible to manually update this package? What if there is no alternative?
The thing is that the Ctrl + Alt + O
(Optimize imports) combination removes classes that are not used in the code, but you need to make sure that the imported classes are sorted automatically before the commit, i.e. the Optimize imports function will run automatically, hence removing all (as PhpStorm thinks) unused classes.
https://www.jetbrains.com/help/phpstorm/creating-a...
What can be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question