Symfony 5 Exception “The annotation was never imported.”


One reason for the error message may be, that it is actually an annotation, that is invalid, but is in the vendor code. Then you should ignore them.

Error message:

Doctrine\Common\Annotations\AnnotationException : [Semantical Error] The annotation "@suppress" in method Monolog\Formatter\LineFormatter::normalizeException() was never imported. Did you maybe forget to add a "use" statement for this annotation?

If you ignore the annotation with the static call to in the config/bootstrap.php:

AnnotationReader::addGlobalIgnoredName('suppress');

 

Comments are closed.