1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00
composer/tests/Composer/Test/Fixtures/installer/unbounded-conflict-does-not-match-default-branch-with-branch-alias.test
Nils Adermann 7197278fe9 Always install aliases together with their original package
Restores some Composer 1.x behavior like unbound constraints conflicting
with default branches unless they are branch aliased.

Simplifies conflicts with aliases because packages cannot be installed
without their aliases, so we do not need to know which aliases are
uninstalled in lock file or installed.json.
2020-11-26 12:10:07 +01:00

31 lines
937 B
Text

--TEST--
Test that a conflict against >=5 does not include the default branch if it has a branch alias defined.
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "conflicter/pkg", "version": "1.0.0", "conflict": { "victim/pkg": ">=5", "victim/pkg2": ">=5" } },
{ "name": "victim/pkg", "version": "dev-master", "default-branch": true, "extra": { "branch-alias": { "dev-master": "2.x-dev" } } },
{ "name": "victim/pkg2", "version": "dev-foo" }
]
}
],
"require": {
"conflicter/pkg": "1.0.0",
"victim/pkg": "*",
"victim/pkg2": "*"
},
"minimum-stability": "dev"
}
--RUN--
update
--EXPECT--
Installing conflicter/pkg (1.0.0)
Installing victim/pkg (dev-master)
Marking victim/pkg (2.x-dev) as installed, alias of victim/pkg (dev-master)
Installing victim/pkg2 (dev-foo)