Inline annotations are not recognised and will give a warning that there is no import for it. When I use the annotation in a docblock for a method or class it will work.
<?php
namespace Gadgetdude\AcmeBundle\Controller;
use Gadgetdude\AcmeBundle\Annotation\Ignore;
/**
* @Ignore (Is resolved correctly)
*/
class TestController
{
/**
* @Ignore (Is resolved correctly)
*/
public function annotationAction()
{
/** @Ignore (Is not resolved, results in warning) */
return $this->doSomethingPrivate();
}
// ...
}
Interesting is that when the annotation is only used inline (which results in a warning) does not result in a unused warning for the use statement above.
<?php
namespace Gadgetdude\AcmeBundle\Controller;
use Gadgetdude\AcmeBundle\Annotation\Ignore; // No unused warning
class TestController
{
public function annotationAction()
{
/** @Ignore (Is not resolved, results in warning) */
return $this->doSomethingPrivate();
}
// ...
}
I've tested it in the last versions of PhpStorm (7.1.3, 7.1.4 and 8.0). The only other custom plugin I have enabled is the Symfony framework plugin, but I don't think that would be an issue (it never was before). The problem I'm having is a recent problem, probably introduced in 1.4 of this plugin or maybe one version earlier?
Inline annotations are not recognised and will give a warning that there is no import for it. When I use the annotation in a docblock for a method or class it will work.
Interesting is that when the annotation is only used inline (which results in a warning) does not result in a unused warning for the use statement above.
I've tested it in the last versions of PhpStorm (7.1.3, 7.1.4 and 8.0). The only other custom plugin I have enabled is the Symfony framework plugin, but I don't think that would be an issue (it never was before). The problem I'm having is a recent problem, probably introduced in 1.4 of this plugin or maybe one version earlier?