I have the following set up on my PC, Ubuntu: 13.10, NetBeans: 8.0, Symfony: 2.4.3, FOSRestBundle: 1.3.0,
and I have a "false" warning "unused use statement" in my code:
use FOS\RestBundle\Controller\Annotations;
where later I have,
/**
/* @Annotations\View()
*/
public function someFunction(){}
The code is working, if I just ignore the warning; however, If I use NetBeans feature "Fix Uses (CTRL+SHIFT+I), the required use statement would be deleted.
I found a relevant bug archive here: https://netbeans.org/bugzilla/show_bug.cgi?id=212932 but the bug has status as resolved.
Other Symfony annotations work fine, e.g. the @Route annotation from Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
I would like to know if there is any way to remove the "false" warning on my use statement.
You must check an option in NetBeans :
Tools -> Options -> PHP -> Annotations -> Treat unknown annotation as Type Annotation
(after you check, close your file, then reopen it)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With