aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/tests/cli_install.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-03 12:10:38 +0900
committernsfisis <nsfisis@gmail.com>2026-05-03 12:10:38 +0900
commitdffb6244ebb432477b83631d68584bbc7186dd94 (patch)
tree4be972cb21de544c53108a244ba4288f4467d544 /crates/mozart/tests/cli_install.rs
parented77ff97d6c137ef58f0464b7a9b08bc2b875bd2 (diff)
downloadphp-mozart-dffb6244ebb432477b83631d68584bbc7186dd94.tar.gz
php-mozart-dffb6244ebb432477b83631d68584bbc7186dd94.tar.zst
php-mozart-dffb6244ebb432477b83631d68584bbc7186dd94.zip
fix(install): treat dev-reference shifts as upgrades
Composer's Transaction fires an UpdateOperation when an installed package's source/dist reference moved, even if the version string is unchanged — that is how a `dev-main#abcd` root require pinning a new commit propagates through `composer install`. Mozart was checking only (name, version) and short-circuiting to Skip, so the package stayed pinned to whatever reference installed.json carried. Compare references in compute_operations and route mismatches into Action::Update. The trace recorder needs the from-side display string to include the reference suffix (`dev-master abc123`) so the EXPECT output matches Composer's UpdateOperation::format; thread that through PackageOperation::Update as a separate from_full_pretty field while keeping from_version (sans suffix) for the upgrade-vs-downgrade direction check, which has to compare normalized versions like Composer's VersionParser::isUpgrade does. Unblocks update_reference, update_reference_picks_latest, and updating_dev_updates_url_and_reference installer fixtures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/tests/cli_install.rs')
0 files changed, 0 insertions, 0 deletions