solver-problems.test 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 could not be found in any version, there may be a typo in the package name.
  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 1.0.1 exists as stable-requiree-excluded/pkg[1.0.0] but these are rejected by your constraint.
  45. Problem 4
  46. - 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.
  47. Problem 5
  48. - Installation request for requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  49. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> no matching package found.
  50. Potential causes:
  51. - A typo in the package name
  52. - The package is not available in a stable-enough version according to your minimum-stability setting
  53. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  54. - It's a private package and you forgot to add a custom repository to find it
  55. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  56. --EXPECT--