EntityRepository.stub missing Selectable interface
维护者通常 1 天内回复
评估
调研方向
定位 Doctrine EntityRepository 存根,并将其模板注解和已实现的接口与 issue 中所示的声明进行比较。使用 PHPStan 重现 MyRepository 示例,然后验证通用接口冲突错误已消失,同时 repository 类型仍然正确。
由索引模型根据 Issue 内容生成。
描述
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
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- 主要语言
- PHP
- 星标
- 683
- 派生
- 129
- 平均合并
- 13 小时 6 分钟
- 30 天内合并 PR
- 14
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
phpstan/phpstan-doctrine 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
phpstan/phpstan-doctrine#816 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
phpstan/phpstan-doctrine#822 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 48/100
phpstan/phpstan-doctrine#805 ·
维护者通常 1 天内回复
-
ORM 3.7 SortDirection support in orderBy clause可能已有人在做 @whataboutpereira 于 48 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
phpstan/phpstan-doctrine#792 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
phpstan/phpstan-doctrine#788 · 2 条评论 ·
维护者通常 1 天内回复
查看 phpstan/phpstan-doctrine 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
phpstan/phpstan-phpunit#361 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
HE-Arc/le-panier-du-coin#49 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 2 天内回复
-
15.0
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 78/100
woocommerce/woocommerce-subscriptions-importer-exporter#298 ·