Open
Description
Feature description or problem with existing feature
@phpstan-require-extends
on a trait force the trait to be used on a specific class.
When I call a method of that specific class on the trait, intelephense does not know the references.
Phpstan even know the references to this method even without @phpstan-require-extends
/** @phpstan-require-extends HelloWorld */
trait Hello
{
public function world(): void
{
$a = $this->hi(); // $a is mixed instead of int, "hi" is unknown to intelephense
}
}
class HelloWorld
{
use Hello;
// here 0 references instead of 1
public function hi(): int
{
return 1;
}
}
Describe the solution you'd like
It could be cool for intelephense to know the references to the calls of "hi". It could use @phpstan-require-extends
if that help to find it