1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/aliased-priority-conflictin...

95 lines
2.9 KiB
Plaintext
Raw Normal View History

--TEST--
Aliases take precedence over default package even if default is selected
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{
"name": "a/req", "version": "dev-feature-foo",
"source": { "reference": "feat.f", "type": "git", "url": "" }
},
{
"name": "a/req", "version": "dev-master",
"extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
2020-06-19 13:35:09 +00:00
"source": { "reference": "forked", "type": "git", "url": "" },
"default-branch": true
},
{
"name": "a/req", "version": "dev-master",
"extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
2020-06-19 13:35:09 +00:00
"source": { "reference": "master", "type": "git", "url": "" },
"default-branch": true
},
{
"name": "a/a", "version": "dev-master",
2020-06-19 13:35:09 +00:00
"require": { "a/req": "dev-master" },
"default-branch": true
},
{
"name": "a/b", "version": "dev-master",
2020-06-19 13:35:09 +00:00
"require": { "a/req": "dev-master" },
"default-branch": true
}
]
}
],
"require": {
"a/a": "dev-master",
"a/b": "dev-master",
"a/req": "dev-feature-foo as dev-master"
},
"minimum-stability": "dev"
}
--EXPECT-LOCK--
{
"packages": [
{
"name": "a/a", "version": "dev-master",
"require": { "a/req": "dev-master" },
2020-06-19 13:35:09 +00:00
"type": "library",
"default-branch": true
},
{
"name": "a/b", "version": "dev-master",
"require": { "a/req": "dev-master" },
2020-06-19 13:35:09 +00:00
"type": "library",
"default-branch": true
},
{
"name": "a/req", "version": "dev-feature-foo",
"source": { "reference": "feat.f", "type": "git", "url": "" },
"type": "library"
}
],
"packages-dev": [],
"aliases": [
{
"alias": "dev-master",
"alias_normalized": "dev-master",
"version": "dev-feature-foo",
"package": "a/req"
}
],
"minimum-stability": "dev",
"stability-flags": {
"a/a": 20,
"a/b": 20,
"a/req": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
install
--EXPECT--
Installing a/req (dev-feature-foo feat.f)
Marking a/req (dev-master feat.f) as installed, alias of a/req (dev-feature-foo feat.f)
Installing a/a (dev-master)
Marking a/a (9999999-dev) as installed, alias of a/a (dev-master)
Installing a/b (dev-master)
Marking a/b (9999999-dev) as installed, alias of a/b (dev-master)