1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/repositories-priorities.test

36 lines
1.2 KiB
Plaintext
Raw Normal View History

--TEST--
Packages found in a higher priority repository take precedence even if they are not found in the requested version
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "foo/a", "version": "1.0.0" }
]
},
{
"type": "package",
"package": [
{ "name": "foo/a", "version": "2.0.0" }
]
}
],
"require": {
"foo/a": "2.*"
}
}
--RUN--
update
--EXPECT-OUTPUT--
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires foo/a 2.*, it is satisfiable by foo/a[2.0.0] from package repo (defining 1 package) but foo/a[1.0.0] from package repo (defining 1 package) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
--EXPECT--
--EXPECT-EXIT-CODE--
2