1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/update-allow-list-with-depe...

109 lines
4.1 KiB
Plaintext
Raw Normal View History

--TEST--
Require a new package in the composer.json and updating with its name as an argument and with-dependencies should update locked dependencies as far as possible
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" } },
{ "name": "current/dep", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}},
{ "name": "current/dep", "version": "1.0.0" },
{ "name": "current/dep", "version": "1.1.0", "require": {"current/dep2": "*"} },
{ "name": "current/dep", "version": "1.2.0" },
{ "name": "current/dep2", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}},
{ "name": "new/pkg", "version": "1.0.0", "require": { "current/dep": "^1.1", "current/dep2": "*"} },
{ "name": "new/pkg", "version": "1.1.0", "require": { "current/dep": "^1.2" } }
]
}
],
"require": {
"current/dep": "dev-master as 1.1.0",
"current/dep2": "dev-master as 1.1.0",
"current/pkg": "1.0.0 as 2.0.0",
"new/pkg": "1.*"
},
"minimum-stability": "dev"
}
--INSTALLED--
[
{ "name": "current/dep", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}},
{ "name": "current/dep2", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}},
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" } }
]
--LOCK--
{
"packages": [
{ "name": "current/dep", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}, "type": "library"},
{ "name": "current/dep2", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}, "type": "library"},
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" } }
],
"packages-dev": [],
"aliases": [
{
"alias": "1.1.0",
"alias_normalized": "1.1.0.0",
"version": "dev-master",
"package": "current/dep"
},
{
"alias": "1.1.0",
"alias_normalized": "1.1.0.0",
"version": "dev-master",
"package": "current/dep2"
}
],
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
update new/pkg --with-all-dependencies
--EXPECT-LOCK--
{
"packages": [
{ "name": "current/dep", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}, "type": "library"},
{ "name": "current/dep2", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}, "type": "library"},
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" }, "type": "library"},
{ "name": "new/pkg", "version": "1.0.0", "require": { "current/dep": "^1.1", "current/dep2": "*"}, "type": "library"}
],
"packages-dev": [],
"aliases": [
{
"alias": "1.1.0",
"alias_normalized": "1.1.0.0",
"version": "dev-master",
"package": "current/dep"
},
{
"alias": "1.1.0",
"alias_normalized": "1.1.0.0",
"version": "dev-master",
"package": "current/dep2"
},
{
"alias": "2.0.0",
"alias_normalized": "2.0.0.0",
"version": "1.0.0.0",
"package": "current/pkg"
}
],
"minimum-stability": "dev",
"stability-flags": {
"current/dep": 20,
"current/dep2": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--EXPECT--
Marking current/dep (1.1.0) as installed, alias of current/dep (dev-master)
Marking current/pkg (2.0.0) as installed, alias of current/pkg (1.0.0)
Marking current/dep2 (1.1.0) as installed, alias of current/dep2 (dev-master)
Installing new/pkg (1.0.0)