From d15447c4547c02aa96d0f4baf423659bca0d4eea Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 4 May 2020 10:28:17 +0200 Subject: [PATCH] Add test for replace version overlap --- .../replace-range-require-single-version.test | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/installer/replace-range-require-single-version.test diff --git a/tests/Composer/Test/Fixtures/installer/replace-range-require-single-version.test b/tests/Composer/Test/Fixtures/installer/replace-range-require-single-version.test new file mode 100644 index 000000000..00b780c4c --- /dev/null +++ b/tests/Composer/Test/Fixtures/installer/replace-range-require-single-version.test @@ -0,0 +1,30 @@ +--TEST-- +Verify replacing an unbound range and requiring a single version works as well as vice versa. + +--COMPOSER-- +{ + "repositories": [ + { + "type": "package", + "package": [ + { "name": "a/a", "version": "1.0.1", "replace": {"c/c": ">2.0" }}, + { "name": "b/b", "version": "1.0.2", "require": {"c/c": "2.1.2" }}, + { "name": "d/d", "version": "1.0.3", "replace": {"f/f": "2.1.2" }}, + { "name": "e/e", "version": "1.0.4", "require": {"f/f": ">2.0" }} + ] + } + ], + "require": { + "a/a": "1.0.1", + "b/b": "1.0.2", + "d/d": "1.0.3", + "e/e": "1.0.4" + } +} +--RUN-- +update +--EXPECT-- +Installing a/a (1.0.1) +Installing b/b (1.0.2) +Installing d/d (1.0.3) +Installing e/e (1.0.4)