Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RepositoriesCollection drops releases of all but the last repository

Open Beginner friendly
#60 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
cli

Research direction

Start in src/Repository/RepositoriesCollection.php at getReleases(), where the generator uses yield from and Collection::create() runs iterator_to_array(), which keeps the colliding integer keys. Remove #[Skip] from RepositoriesCollectionTest::mergesReleasesOfAllRepositories and run vendor/bin/testo --filter=mergesReleasesOfAllRepositories to see the failure first. Done means the test passes and releases from every repository appear in the result.

Written by the indexing model from the issue text.

Description

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.

Dominant language
PHP
Stars
30
Forks
15
Avg merge
45m
Merged PRs (30d)
11

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from roadrunner-php/cli

All issues in roadrunner-php/cli

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.