2020-01-30 10:37:19 +00:00
--TEST--
Test that a replacer can not be installed together with another version of the package it replaces
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{"name": "replacer/pkg", "version": "2.0.0", "replace": { "regular/pkg": "self.version" }},
{"name": "replacer/pkg", "version": "2.0.1", "replace": { "regular/pkg": "self.version" }},
{"name": "replacer/pkg", "version": "2.0.2", "replace": { "regular/pkg": "self.version" }},
{"name": "replacer/pkg", "version": "2.0.3", "replace": { "regular/pkg": "self.version" }},
{"name": "regular/pkg", "version": "1.0.0"},
{"name": "regular/pkg", "version": "1.0.1"},
{"name": "regular/pkg", "version": "1.0.2"},
{"name": "regular/pkg", "version": "1.0.3"},
{"name": "regular/pkg", "version": "2.0.0"},
{"name": "regular/pkg", "version": "2.0.1"}
]
}
],
"require": {
"regular/pkg": "1.*",
"replacer/pkg": "2.*"
}
}
--RUN--
update
--EXPECT-EXIT-CODE--
2
--EXPECT-OUTPUT--
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
2020-10-21 12:08:12 +00:00
- Conclusion: don't install regular/pkg 1.0.1 (conflict analysis result)
2020-10-21 15:11:13 +00:00
- Conclusion: don't install regular/pkg 1.0.2 (conflict analysis result)
- Conclusion: don't install regular/pkg 1.0.3 (conflict analysis result)
2020-05-01 13:47:11 +00:00
- Only one of these can be installed: regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3], replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3]. replacer/pkg replaces regular/pkg and thus cannot coexist with it.
2020-01-30 10:37:19 +00:00
- Root composer.json requires regular/pkg 1.* -> satisfiable by regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3].
- Root composer.json requires replacer/pkg 2.* -> satisfiable by replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3].
--EXPECT--