solver-problems.test 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. --LOCK--
  32. {
  33. "packages": [
  34. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" }
  35. ],
  36. "packages-dev": [],
  37. "aliases": [],
  38. "minimum-stability": "dev",
  39. "stability-flags": [],
  40. "prefer-stable": false,
  41. "prefer-lowest": false,
  42. "platform": [],
  43. "platform-dev": []
  44. }
  45. --RUN--
  46. update unstable/package requirer/pkg dependency/pkg
  47. --EXPECT-EXIT-CODE--
  48. 2
  49. --EXPECT-OUTPUT--
  50. Loading composer repositories with package information
  51. Updating dependencies
  52. Your requirements could not be resolved to an installable set of packages.
  53. Problem 1
  54. - The requested package unstable/package could not be found in any version, there may be a typo in the package name.
  55. Problem 2
  56. - The requested package bogus/pkg could not be found in any version, there may be a typo in the package name.
  57. Problem 3
  58. - Installation request for requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  59. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> no matching package found.
  60. Problem 4
  61. - stable-requiree-excluded/pkg is locked to version 1.0.0 and an update of this package was not requested.
  62. - Same name, can only install one of: stable-requiree-excluded/pkg[1.0.1, 1.0.0].
  63. - Installation request for stable-requiree-excluded/pkg 1.0.1 -> satisfiable by stable-requiree-excluded/pkg[1.0.1].
  64. Potential causes:
  65. - A typo in the package name
  66. - The package is not available in a stable-enough version according to your minimum-stability setting
  67. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  68. - It's a private package and you forgot to add a custom repository to find it
  69. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  70. --EXPECT--