Ensure packages that exist in a higher prio repo never get loaded in lower prio repos, fixes #5076
parent
4a7d42604f
commit
47a94b3a88
@ -0,0 +1,42 @@
|
|||||||
|
--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
|
||||||
|
- The requested package foo/a could not be found in any version, there may be a typo in the package name.
|
||||||
|
|
||||||
|
Potential causes:
|
||||||
|
- A typo in the package name
|
||||||
|
- The package is not available in a stable-enough version according to your minimum-stability setting
|
||||||
|
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
|
||||||
|
- It's a private package and you forgot to add a custom repository to find it
|
||||||
|
|
||||||
|
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
|
||||||
|
--EXPECT--
|
||||||
|
--EXPECT-EXIT-CODE--
|
||||||
|
2
|
@ -0,0 +1,26 @@
|
|||||||
|
--TEST--
|
||||||
|
Packages found in a higher priority repository take precedence
|
||||||
|
--COMPOSER--
|
||||||
|
{
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "package",
|
||||||
|
"package": [
|
||||||
|
{ "name": "foo/a", "version": "1.0.0" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "package",
|
||||||
|
"package": [
|
||||||
|
{ "name": "foo/a", "version": "1.1.0" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"foo/a": "1.*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--RUN--
|
||||||
|
update
|
||||||
|
--EXPECT--
|
||||||
|
Installing foo/a (1.0.0)
|
Loading…
Reference in New Issue