False positive: Call to inArray() with different object instances will always evaluate to true
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the PHP example involving Webmozart\Assert\Assert::inArray(), then trace how the extension handles that assertion for distinct object instances. Done means the example no longer produces the reported false positive and the behavior is covered by a regression test.
由索引模型根据 Issue 内容生成。
描述
class A {
public function __construct(private string $val) {
}
}
function foo(A $a) {
Assert::inArray($a, [new A('a')]);
}
gives:
Call to static method Webmozart\Assert\Assert::inArray() with arguments A and array(A) will always evaluate to true
- 主要语言
- PHP
- 星标
- 185
- 派生
- 33
- 平均合并
- 20 小时 40 分钟
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
phpstan/phpstan-webmozart-assert 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
phpstan/phpstan-webmozart-assert#187 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 32/100
phpstan/phpstan-webmozart-assert#180 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 38/100
phpstan/phpstan-webmozart-assert#6 · 3 条评论 · 2 个 reaction ·
查看 phpstan/phpstan-webmozart-assert 的全部 Issue
相似的 Issue
-
bug needs grooming
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 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