solver-problems.test 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --TEST--
  2. Test the error output of solver problems.
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "unstable/package", "version": "2.0.0-alpha" },
  10. { "name": "unstable/package", "version": "1.0.0" },
  11. { "name": "requirer/pkg", "version": "1.0.0", "require": {"dependency/pkg": "1.0.0" } },
  12. { "name": "dependency/pkg", "version": "2.0.0" },
  13. { "name": "dependency/pkg", "version": "1.0.0" },
  14. { "name": "stable-requiree-excluded/pkg", "version": "1.0.1" },
  15. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" }
  16. ]
  17. }
  18. ],
  19. "require": {
  20. "unstable/package": "2.*",
  21. "bogus/pkg": "1.*",
  22. "requirer/pkg": "1.*",
  23. "dependency/pkg": "2.*",
  24. "stable-requiree-excluded/pkg": "1.0.1"
  25. }
  26. }
  27. --INSTALLED--
  28. [
  29. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" }
  30. ]
  31. --RUN--
  32. update unstable/package requirer/pkg dependency/pkg
  33. --EXPECT-EXIT-CODE--
  34. 2
  35. --EXPECT-OUTPUT--
  36. Loading composer repositories with package information
  37. Updating dependencies (including require-dev)
  38. Your requirements could not be resolved to an installable set of packages.
  39. Problem 1
  40. - The requested package unstable/package 2.* exists as unstable/package[1.0.0] but these are rejected by your constraint.
  41. Problem 2
  42. - The requested package bogus/pkg could not be found in any version, there may be a typo in the package name.
  43. Problem 3
  44. - The requested package stable-requiree-excluded/pkg (installed at 1.0.0, required as 1.0.1) is satisfiable by stable-requiree-excluded/pkg[1.0.0] but these conflict with your requirements or minimum-stability.
  45. Problem 4
  46. - Installation request for requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  47. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> satisfiable by dependency/pkg[1.0.0] but these conflict with your requirements or minimum-stability.
  48. Potential causes:
  49. - A typo in the package name
  50. - The package is not available in a stable-enough version according to your minimum-stability setting
  51. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  52. - It's a private package and you forgot to add a custom repository to find it
  53. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  54. --EXPECT--