I've just started using PhpStan. I want to bind a specific base interface to a template variable, but the namespace is ignored. Whatever I try, PhpStand looks in namespace A\...
namespace A;
use B\FooInterface;
/**
* @template T of FooInterface
*/
interface BarInterface
{
/**
* @param T $baz
* @return mixed
*/
public function doSomething($baz);
}
...complains about invalid bound type A\FooInterface.
namespace A;
/**
* @template T of \B\FooInterface
*/
...
...complains about invalid bound type A\B\FooInterface
Looks like a bug in PHPStan to me, but since I've never used it before, I can't be sure if it isn't me...