klesun / deep-assoc-completion

A phpstorm plugin for associative array key typing and completion
Other
266 stars 17 forks source link

Support template generics in PSALM class inheritance #164

Open klesun opened 4 years ago

klesun commented 4 years ago

Originally requested in https://github.com/klesun/deep-assoc-completion/issues/162#issuecomment-675152123

Quoting @zmitic:


There is one minor issue, probably irrelevant. Because of nested-set requiring its own parent repository (not one from example under), I put code in trait like this:

class CityRepository extends ServiceEntityRepository
{
    /** @use RepositoryUtilsTrait<City> */
    use RepositoryUtilsTrait;

    public function __construct(ManagerRegistry $registry)
    {
        parent::__construct($registry, City::class);
    }
}

Trait itself:

    /**
     * @return ?T
     */
    public function getOneResultOrNull(Generator ...$generators)
    {
       // ...
    }

No results:

image