🎧 Escutando The Great Gig in The Sky by Pink Floyd
🇧🇷 Agora em Curitiba, PR

How to fix: 'Semantical Error with @Nelmio\ApiDocBundle\Annotation\ApiDoc'

Por Guilmour Rossi
25 de Novembro de 2020

If, on your PHP backend app you’re using Symfony Doctrine and face this error:

error: "[Semantical Error] The annotation "@Nelmio\ApiDocBundle\Annotation\ApiDoc" in method (...) was never imported. Did you maybe forget to add a "use" statement for this annotation? in (...) (which is being imported from "(...)"). Make sure annotations are installed and enabled."

Just execute:

composer update nelmio/api-doc-bundle

If still not working, try the all composer install:

composer install

and, in last case:

composer update

– Guilmour