Todos os posts em: tutorials

feed | list

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


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