diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-02 22:59:23 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-02 22:59:23 +0900 |
| commit | b60cf8d9cb6776e5df85f080b5bb3fba252e154c (patch) | |
| tree | 66770723795378fc65f1aeab726973b18813aef8 /crates/mozart/tests | |
| parent | 3c61a7e1e557e3b90128d2ec29227f166b17c05b (diff) | |
| download | php-mozart-b60cf8d9cb6776e5df85f080b5bb3fba252e154c.tar.gz php-mozart-b60cf8d9cb6776e5df85f080b5bb3fba252e154c.tar.zst php-mozart-b60cf8d9cb6776e5df85f080b5bb3fba252e154c.zip | |
fix(resolver): honor root self-provide/replace as require fulfilment
Port Composer's RuleSetGenerator::createRequireRule self-fulfilling
branch: when the root composer.json's `provide` or `replace` covers a
name it also requires (with intersecting constraints), skip emitting an
install-one-of rule for that root require. Composer relies on the root
package being a fixed entry in the pool so whatProvides() includes it;
Mozart does not yet add the root to the pool, so the same decision is
made via explicit `root_provide` / `root_replace` tables threaded
through ResolveRequest. Without this, an inline repo package whose name
matches the root's provide was being force-installed.
Fixes installer fixtures `provider_satisfies_its_own_requirement` and
`replacer_satisfies_its_own_requirement`.
Diffstat (limited to 'crates/mozart/tests')
| -rw-r--r-- | crates/mozart/tests/installer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index fcb29c1..99ef2d8 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -327,7 +327,7 @@ installer_fixture!( provider_packages_can_not_be_installed_unless_selected, ignore ); -installer_fixture!(provider_satisfies_its_own_requirement, ignore); +installer_fixture!(provider_satisfies_its_own_requirement); installer_fixture!(remove_deletes_unused_deps); installer_fixture!( remove_does_nothing_if_removal_requires_update_of_dep, @@ -342,7 +342,7 @@ installer_fixture!( replaced_packages_should_not_be_installed_when_installing_from_lock, ignore ); -installer_fixture!(replacer_satisfies_its_own_requirement, ignore); +installer_fixture!(replacer_satisfies_its_own_requirement); installer_fixture!(repositories_priorities, ignore); installer_fixture!(repositories_priorities2, ignore); installer_fixture!(repositories_priorities3, ignore); |
