Correcting lock files in test cases and updating output
parent
e6e317bc27
commit
eaae360ce6
|
@ -162,7 +162,7 @@ class Locker
|
|||
if (isset($lockData['packages-dev'])) {
|
||||
$lockedPackages = array_merge($lockedPackages, $lockData['packages-dev']);
|
||||
} else {
|
||||
throw new \RuntimeException('The lock file does not contain require-dev information, run install with the --no-dev option or run update to install those packages.');
|
||||
throw new \RuntimeException('The lock file does not contain require-dev information, run install with the --no-dev option or delete it and run composer update to generate a new lock file.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,15 @@ Abandoned packages are flagged
|
|||
install
|
||||
--EXPECT-OUTPUT--
|
||||
Loading composer repositories with package information
|
||||
Updating dependencies (including require-dev)
|
||||
Updating dependencies
|
||||
Lock file operations: 2 installs, 0 updates, 0 removals
|
||||
- Installing c/c (1.0.0)
|
||||
- Installing a/a (1.0.0)
|
||||
Writing lock file
|
||||
Installing dependencies from lock file (including require-dev)
|
||||
Package operations: 2 installs, 0 updates, 0 removals
|
||||
<warning>Package a/a is abandoned, you should avoid using it. No replacement was suggested.</warning>
|
||||
<warning>Package c/c is abandoned, you should avoid using it. Use b/b instead.</warning>
|
||||
Writing lock file
|
||||
Generating autoload files
|
||||
|
||||
--EXPECT--
|
||||
|
|
|
@ -20,9 +20,13 @@ Suggestions are not displayed for packages if they are replaced
|
|||
install
|
||||
--EXPECT-OUTPUT--
|
||||
Loading composer repositories with package information
|
||||
Updating dependencies (including require-dev)
|
||||
Package operations: 2 installs, 0 updates, 0 removals
|
||||
Updating dependencies
|
||||
Lock file operations: 2 installs, 0 updates, 0 removals
|
||||
- Installing c/c (1.0.0)
|
||||
- Installing a/a (1.0.0)
|
||||
Writing lock file
|
||||
Installing dependencies from lock file (including require-dev)
|
||||
Package operations: 2 installs, 0 updates, 0 removals
|
||||
Generating autoload files
|
||||
|
||||
--EXPECT--
|
||||
|
|
|
@ -36,7 +36,7 @@ Update aliased package does not mess up the lock file
|
|||
{ "package": "a/a", "version": "dev-master", "source-reference": "1234" },
|
||||
{ "package": "a/a", "version": "dev-master", "alias-pretty-version": "1.0.x-dev", "alias-version": "1.0.9999999.9999999-dev" }
|
||||
],
|
||||
"packages-dev": null,
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
|
|
|
@ -31,7 +31,15 @@ Converting from one VCS type to another (including an URL change) should update
|
|||
"name": "a/a", "version": "1.0.0",
|
||||
"source": { "reference": "old-hg-ref", "type": "hg", "url": "old-hg-url" }
|
||||
}
|
||||
]
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
||||
--RUN--
|
||||
update
|
||||
|
|
|
@ -37,6 +37,23 @@ Update with a package whitelist only updates those packages matching the pattern
|
|||
{ "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
|
||||
{ "name": "unrelated-dependency", "version": "1.0.0" }
|
||||
]
|
||||
--LOCK--
|
||||
{
|
||||
"packages": [
|
||||
{ "name": "fixed", "version": "1.0.0" },
|
||||
{ "name": "whitelisted-component1", "version": "1.0.0" },
|
||||
{ "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
|
||||
{ "name": "dependency", "version": "1.0.0" },
|
||||
{ "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
|
||||
{ "name": "unrelated-dependency", "version": "1.0.0" }
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {"a/a":20},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false
|
||||
}
|
||||
--RUN--
|
||||
update whitelisted-*
|
||||
--EXPECT--
|
||||
|
|
|
@ -33,6 +33,22 @@ Update with a package whitelist only updates whitelisted packages if no dependen
|
|||
{ "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
|
||||
{ "name": "unrelated-dependency", "version": "1.0.0" }
|
||||
]
|
||||
--LOCK--
|
||||
{
|
||||
"packages": [
|
||||
{ "name": "fixed", "version": "1.0.0" },
|
||||
{ "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
|
||||
{ "name": "dependency", "version": "1.0.0" },
|
||||
{ "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
|
||||
{ "name": "unrelated-dependency", "version": "1.0.0" }
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {"a/a":20},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false
|
||||
}
|
||||
--RUN--
|
||||
update whitelisted
|
||||
--EXPECT--
|
||||
|
|
Loading…
Reference in New Issue