RepositoriesCollection drops releases of all but the last repository
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 src/Repository/RepositoriesCollection.php 中的 getReleases() 开始,这里生成器使用 yield from,而 Collection::create() 会执行 iterator_to_array(),它会保留冲突的整数键。移除 RepositoriesCollectionTest::mergesReleasesOfAllRepositories 上的 #[Skip],然后运行 vendor/bin/testo --filter=mergesReleasesOfAllRepositories 先查看失败情况。当测试通过且所有仓库的发布版本都出现在结果中时,即完成。
由索引模型根据 Issue 内容生成。
描述
Description
RepositoriesCollection::getReleases() loses releases when it aggregates more than one repository. Two repositories with one release each produce a collection with only the second release.
getReleases() builds the collection from a generator that uses yield from over each repository's releases. Collection::create() turns it into an array with iterator_to_array(), which keeps the keys. Every repository yields keys starting at 0, so a later repository overwrites the releases of an earlier one at the same index.
Today Command::getRepository() passes a single GitHub repository, so the CLI is not affected yet. Any second source added to the collection would silently replace the first one's releases.
Steps to reproduce
- Remove
#[Skip]fromRepositoriesCollectionTest::mergesReleasesOfAllRepositories. - Run
vendor/bin/testo --filter=mergesReleasesOfAllRepositories.
Additional context
The release lookup may be replaced by DLoad in #49, in which case this code goes away.
- 主要语言
- PHP
- 星标
- 30
- 派生
- 15
- 平均合并
- 45 分钟
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
roadrunner-php/cli 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
roadrunner-php/cli#69 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
roadrunner-php/cli#68 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
roadrunner-php/cli#67 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
roadrunner-php/cli#62 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
roadrunner-php/cli#61 ·
维护者通常 1 天内回复
查看 roadrunner-php/cli 的全部 Issue
相似的 Issue
-
sync-en
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Refund Analytics Tool — “Check” Button Fails to Render in WooCommerce 11.2.1可能已有人在做 @MinhazI 今天认领。 未关闭Bug Reports/Analytics type: community contribution
难度 2/5 1-3 小时 新手友好度 70/100
woocommerce/woocommerce#69689 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 2 天内回复