2020-03-27 21:46:54 +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" } },
{ "name": "current/pkg", "version": "1.1.0", "require": { "current/dep": "^1.0" } },
{ "name": "current/dep", "version": "1.0.0" },
{ "name": "current/dep", "version": "1.1.0" },
{ "name": "current/dep", "version": "1.2.0" },
{ "name": "new/pkg", "version": "1.0.0", "require": { "current/dep": "^1.1" } },
{ "name": "new/pkg", "version": "1.1.0", "require": { "current/dep": "^1.2" } }
]
}
],
"require": {
"current/pkg": "1.*",
"new/pkg": "1.*"
}
}
--INSTALLED--
[
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" } },
{ "name": "current/dep", "version": "1.0.0" }
]
--LOCK--
{
"packages": [
{ "name": "current/pkg", "version": "1.0.0", "require": { "current/dep": "<1.2.0" } },
{ "name": "current/dep", "version": "1.0.0" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
2024-09-18 14:32:40 +00:00
"stability-flags": {},
2020-03-27 21:46:54 +00:00
"prefer-stable": false,
"prefer-lowest": false,
2024-09-18 14:32:40 +00:00
"platform": {},
"platform-dev": {}
2020-03-27 21:46:54 +00:00
}
--RUN--
update new/pkg --with-dependencies
--EXPECT--
Upgrading current/dep (1.0.0 => 1.1.0)
Installing new/pkg (1.0.0)