From 85ea29d2418e162e30a0577b331a97c58b81783a Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 29 Apr 2020 23:01:57 +0200 Subject: [PATCH] PoolBuilder failing test: do not load alternatives for pkg replaced by fixed pkg --- ...kages-replaced-do-not-load-from-repos.test | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/Composer/Test/DependencyResolver/Fixtures/poolbuilder/fixed-packages-replaced-do-not-load-from-repos.test diff --git a/tests/Composer/Test/DependencyResolver/Fixtures/poolbuilder/fixed-packages-replaced-do-not-load-from-repos.test b/tests/Composer/Test/DependencyResolver/Fixtures/poolbuilder/fixed-packages-replaced-do-not-load-from-repos.test new file mode 100644 index 000000000..8006fc8db --- /dev/null +++ b/tests/Composer/Test/DependencyResolver/Fixtures/poolbuilder/fixed-packages-replaced-do-not-load-from-repos.test @@ -0,0 +1,29 @@ +--TEST-- +Packages replaced by fixed packages do not get loaded from the repos + +--REQUEST-- +{ + "some/pkg": "*", + "root/req": "*" +} + +--FIXED-- +[ + {"name": "some/pkg", "version": "1.0.3", "replace": {"dep/dep": "2.1.0"}, "id": 1} +] + +--PACKAGES-- +[ + {"name": "some/pkg", "version": "1.0.0"}, + {"name": "root/req", "version": "1.0.0", "require": {"dep/dep": "2.*"}}, + {"name": "root/req", "version": "2.0.0", "require": {"dep/dep": "3.*"}}, + {"name": "dep/dep", "version": "2.3.4"}, + {"name": "dep/dep", "version": "3.0.1"} +] + +--EXPECT-- +[ + 1, + "root/req-1.0.0.0", + "root/req-2.0.0.0" +]