Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RepositoriesCollection drops releases of all but the last repository

オープン 初心者向け
#60 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
cli

調査の方向性

src/Repository/RepositoriesCollection.php の getReleases() から始めてください。ここではジェネレータが yield from を使い、Collection::create() が iterator_to_array() を実行しているため、衝突する整数キーが保持されます。RepositoriesCollectionTest::mergesReleasesOfAllRepositories から #[Skip] を削除し、vendor/bin/testo --filter=mergesReleasesOfAllRepositories を実行して、まず失敗を確認してください。テストが成功し、すべてのリポジトリのリリースが結果に含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

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

  1. Remove #[Skip] from RepositoriesCollectionTest::mergesReleasesOfAllRepositories.
  2. 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分
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

roadrunner-php/cli のほかの issue

roadrunner-php/cli の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。