1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/outdated-lock-file-fails-in...

40 lines
1.5 KiB
Plaintext
Raw Normal View History

--TEST--
Test that install checks missing requirements from both composer.json if the lock file is outdated.
--COMPOSER--
{
"require": {
"some/dep": "dev-main",
"some/dep2": "dev-main"
}
}
--LOCK--
{
"content-hash": "old",
"packages": [
{"name": "some/dep", "version": "dev-foo"}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
2024-09-18 14:32:40 +00:00
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
2024-09-18 14:32:40 +00:00
"platform": {},
"platform-dev": {}
}
--RUN--
install
--EXPECT-EXIT-CODE--
4
--EXPECT-OUTPUT--
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
<warning>Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.</warning>
- Required package "some/dep" is in the lock file as "dev-foo" but that does not satisfy your constraint "dev-main".
- Required package "some/dep2" is not present in the lock file.
This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.
Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md
and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
--EXPECT--