It seems that compared to doctrine EntityRepository, the stub is missing generics and implementation of Selectable interface.
What i mean is that stub is declared:
/**
* @template T of object
* @implements ObjectRepository<T>
*/
class EntityRepository implements ObjectRepository
{
// ...
}
instead of:
/**
* @template T of object
* @template-implements Selectable<int,T>
* @template-implements ObjectRepository<T>
*/
class EntityRepository implements ObjectRepository, Selectable
{
// ...
}
This causes problems when I'm trying to make interface for mine repository that would cover all the methods:
/**
* @extends EntityRepository<MyEntity>
*/
class MyRepository extends EntityRepository implements MyRepositoryInterface
{
// ...
}
/**
* @extends ObjectRepository<MyEntity>
* @extends Selectable<int, MyEntity>
*/
interface MyRepositoryInterface extends ObjectRepository, Selectable
{
// ...
}
This works fine without phpstan/phpstan-doctrine but fails due to stub with:
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line VaultRepository.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13 Class Doctrine\ORM\EntityRepository specifies template type T of interface Doctrine\Common\Collections\Selectable as mixed but it's already specified as Entity\MyEntity.
🪪 generics.interfaceConflict
13 Class Doctrine\ORM\EntityRepository specifies template type TKey of interface Doctrine\Common\Collections\Selectable as mixed but it's already specified as int.
🪪 generics.interfaceConflict
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It seems that compared to doctrine EntityRepository, the stub is missing generics and implementation of Selectable interface.
What i mean is that stub is declared:
instead of:
This causes problems when I'm trying to make interface for mine repository that would cover all the methods:
This works fine without
phpstan/phpstan-doctrinebut fails due to stub with: