composer / composer/satis

Could the "only-best-candidates" logic also be used for archived packages

Open
#738 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
PHP
Stars
3.3k
Forks
530
Avg merge
6h 53m
Merged PRs (30d)
13

Description

In our use of satis we would like to only make dist packages of the latest version of a project.
We've noticed that the "only-best-candidates" option exists for dependencies, but I could be nice if a likewise option also existed for the archive.

A solution could be to add a new config option to the archive segment which states that only the best package version candidate should be stored. Adjustments can them be made to the "isSkippable" part of "src/Builder/ArchiveBuilderHelper.php"
I've added a suggested patch which takes a lot of the "onlyBestCandidates" logic from "src/PackageSelection/PackageSelection.php".
[satis-archive-only-best-candidates.txt](https://github.com/composer/satis/files/12830425/satis-archive-only-best-candidates.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.