repositories-priorities.test 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Packages found in a higher priority repository take precedence even if they are not found in the requested version
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "foo/a", "version": "1.0.0" }
  10. ]
  11. },
  12. {
  13. "type": "package",
  14. "package": [
  15. { "name": "foo/a", "version": "2.0.0" }
  16. ]
  17. }
  18. ],
  19. "require": {
  20. "foo/a": "2.*"
  21. }
  22. }
  23. --RUN--
  24. update
  25. --EXPECT-OUTPUT--
  26. Loading composer repositories with package information
  27. Updating dependencies
  28. Your requirements could not be resolved to an installable set of packages.
  29. Problem 1
  30. - The requested package foo/a could not be found in any version, there may be a typo in the package name.
  31. Potential causes:
  32. - A typo in the package name
  33. - The package is not available in a stable-enough version according to your minimum-stability setting
  34. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  35. - It's a private package and you forgot to add a custom repository to find it
  36. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  37. --EXPECT--
  38. --EXPECT-EXIT-CODE--
  39. 2