2016-02-02 09:45:57 +00:00
--TEST--
2024-10-02 10:28:32 +00:00
See GitHub issue #4795 ( github.com/composer/composer/issues/4795 ).
2016-02-02 09:45:57 +00:00
2020-06-07 21:15:09 +00:00
Composer\Installer::allowListUpdateDependencies intentionally ignores root requirements even if said package is also a
dependency of one the requirements that is allowed for update.
2016-02-02 09:45:57 +00:00
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
2019-01-29 12:27:52 +00:00
{ "name": "a/a", "version": "1.0.0" },
{ "name": "a/a", "version": "1.1.0" },
{ "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } },
2020-03-27 20:41:49 +00:00
{ "name": "b/b", "version": "1.1.0", "require": { "a/a": "~1.1" } }
2016-02-02 09:45:57 +00:00
]
}
],
"require": {
2019-01-29 12:27:52 +00:00
"a/a": "~1.0",
"b/b": "~1.0"
2016-02-02 09:45:57 +00:00
}
}
--INSTALLED--
[
2019-01-29 12:27:52 +00:00
{ "name": "a/a", "version": "1.0.0" },
{ "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } }
2016-02-02 09:45:57 +00:00
]
2019-10-29 22:16:38 +00:00
--LOCK--
{
"packages": [
{ "name": "a/a", "version": "1.0.0" },
{ "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
2024-09-18 14:32:40 +00:00
"stability-flags": {},
2019-10-29 22:16:38 +00:00
"prefer-stable": false,
"prefer-lowest": false,
2024-09-18 14:32:40 +00:00
"platform": {},
"platform-dev": {}
2019-10-29 22:16:38 +00:00
}
2016-02-02 09:45:57 +00:00
--RUN--
2019-01-29 12:27:52 +00:00
update b/b --with-dependencies
2016-02-02 09:45:57 +00:00
--EXPECT-OUTPUT--
2016-02-04 11:45:55 +00:00
Loading composer repositories with package information
2021-11-23 11:58:59 +00:00
<warning>Dependency a/a is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.</warning>
2020-11-11 10:49:50 +00:00
Updating dependencies
2019-10-29 23:24:25 +00:00
Nothing to modify in lock file
2016-02-04 11:45:55 +00:00
Writing lock file
2019-10-29 23:24:25 +00:00
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
2016-02-04 11:45:55 +00:00
Generating autoload files
2016-02-02 09:45:57 +00:00
--EXPECT--