2020-04-01 14:29:24 +00:00
--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" } },
2020-04-01 22:08:53 +00:00
{ "name": "current/dep", "version": "dev-master", "extra": {"branch-alias": {"dev-master": "1.0.x-dev"}}},
2020-04-01 14:29:24 +00:00
{ "name": "current/dep", "version": "1.0.0" },
2020-04-01 22:08:53 +00:00
{ "name": "current/dep", "version": "1.1.0", "require": {"current/dep2": "*"} },
2020-04-01 14:29:24 +00:00
{ "name": "current/dep", "version": "1.2.0" },
2020-04-01 22:08:53 +00:00
{ "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": "*"} },
2020-04-01 14:29:24 +00:00
{ "name": "new/pkg", "version": "1.1.0", "require": { "current/dep": "^1.2" } }
]
}
],
"require": {
2020-04-01 22:08:53 +00:00
"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",
2020-04-01 14:29:24 +00:00
"new/pkg": "1.*"
2020-04-01 22:08:53 +00:00
},
"minimum-stability": "dev"
2020-04-01 14:29:24 +00:00
}
--INSTALLED--
[
2020-04-01 22:08:53 +00:00
{ "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" } }
2020-04-01 14:29:24 +00:00
]
--LOCK--
{
"packages": [
2020-04-01 22:08:53 +00:00
{ "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" } }
2020-04-01 14:29:24 +00:00
],
"packages-dev": [],
2020-04-01 22:08:53 +00:00
"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"
}
],
2020-04-01 14:29:24 +00:00
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
2020-04-01 22:08:53 +00:00
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": []
}
2020-04-01 14:29:24 +00:00
--EXPECT--
2020-04-01 22:08:53 +00:00
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)
2020-04-01 14:29:24 +00:00
Installing new/pkg (1.0.0)