solver-problems.test 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. --TEST--
  2. Test the error output of solver problems.
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "package/found", "version": "2.0.0", "require": {
  10. "unstable/package2": "2.*"
  11. } },
  12. { "name": "package/found2", "version": "2.0.0", "require": {
  13. "invalid/💩package": "*"
  14. } },
  15. { "name": "package/found3", "version": "2.0.0", "require": {
  16. "unstable/package2": "2.*"
  17. } },
  18. { "name": "package/found4", "version": "2.0.0", "require": {
  19. "non-existent/pkg2": "1.*"
  20. } },
  21. { "name": "package/found5", "version": "2.0.0", "require": {
  22. "requirer/pkg": "1.*"
  23. } },
  24. { "name": "package/found6", "version": "2.0.0", "require": {
  25. "stable-requiree-excluded/pkg2": "1.0.1"
  26. } },
  27. { "name": "package/found7", "version": "2.0.0", "require": {
  28. "php-64bit": "1.0.1"
  29. } },
  30. { "name": "conflict/requirer", "version": "2.0.0", "require": {
  31. "conflict/dep": "1.0.0"
  32. } },
  33. { "name": "conflict/requirer2", "version": "2.0.0", "require": {
  34. "conflict/dep": "2.0.0"
  35. } },
  36. { "name": "conflict/dep", "version": "1.0.0" },
  37. { "name": "conflict/dep", "version": "2.0.0" },
  38. { "name": "unstable/package", "version": "2.0.0-alpha" },
  39. { "name": "unstable/package", "version": "1.0.0" },
  40. { "name": "unstable/package2", "version": "2.0.0-alpha" },
  41. { "name": "unstable/package2", "version": "1.0.0" },
  42. { "name": "requirer/pkg", "version": "1.0.0", "require": {
  43. "dependency/pkg": "1.0.0",
  44. "dependency/unstable-pkg": "1.0.0-dev"
  45. } },
  46. { "name": "dependency/pkg", "version": "2.0.0" },
  47. { "name": "dependency/pkg", "version": "1.0.0" },
  48. { "name": "dependency/unstable-pkg", "version": "1.0.0-dev" },
  49. { "name": "stable-requiree-excluded/pkg", "version": "1.0.1" },
  50. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" }
  51. ]
  52. }
  53. ],
  54. "require": {
  55. "package/found": "2.*",
  56. "package/found2": "2.*",
  57. "package/found3": "2.*",
  58. "package/found4": "2.*",
  59. "package/found5": "2.*",
  60. "package/found6": "2.*",
  61. "package/found7": "2.*",
  62. "conflict/requirer": "2.*",
  63. "conflict/requirer2": "2.*",
  64. "unstable/package": "2.*",
  65. "non-existent/pkg": "1.*",
  66. "requirer/pkg": "1.*",
  67. "dependency/pkg": "2.*",
  68. "stable-requiree-excluded/pkg": "1.0.1",
  69. "lib-xml": "1002.*",
  70. "lib-icu": "1001.*",
  71. "ext-xml": "1002.*",
  72. "php": "1"
  73. }
  74. }
  75. --INSTALLED--
  76. [
  77. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" },
  78. { "name": "stable-requiree-excluded/pkg2", "version": "1.0.0" }
  79. ]
  80. --LOCK--
  81. {
  82. "packages": [
  83. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" },
  84. { "name": "stable-requiree-excluded/pkg2", "version": "1.0.0" }
  85. ],
  86. "packages-dev": [],
  87. "aliases": [],
  88. "minimum-stability": "dev",
  89. "stability-flags": [],
  90. "prefer-stable": false,
  91. "prefer-lowest": false,
  92. "platform": [],
  93. "platform-dev": []
  94. }
  95. --RUN--
  96. update unstable/package requirer/pkg dependency/pkg conflict/requirer
  97. --EXPECT-EXIT-CODE--
  98. 2
  99. --EXPECT-OUTPUT--
  100. Loading composer repositories with package information
  101. Updating dependencies
  102. Your requirements could not be resolved to an installable set of packages.
  103. Problem 1
  104. - Root composer.json requires unstable/package 2.*, found unstable/package[2.0.0-alpha] but it does not match your minimum-stability.
  105. Problem 2
  106. - Root composer.json requires non-existent/pkg, it could not be found in any version, there may be a typo in the package name.
  107. Problem 3
  108. - Root composer.json requires stable-requiree-excluded/pkg 1.0.1, found stable-requiree-excluded/pkg[1.0.1] but the package is fixed to 1.0.0 (lock file version) by a partial update and that version does not match. Make sure you whitelist it for update.
  109. Problem 4
  110. - Root composer.json requires linked library lib-xml 1002.* but it has the wrong version installed or is missing from your system, make sure to load the extension providing it.
  111. Problem 5
  112. - Root composer.json requires linked library lib-icu 1001.* but it has the wrong version installed, try upgrading the intl extension.
  113. Problem 6
  114. - Root composer.json requires PHP extension ext-xml 1002.* but it has the wrong version (%s) installed. Install or enable PHP's xml extension.
  115. Problem 7
  116. - Root composer.json requires php 1 but your php version (%s) does not satisfy that requirement.
  117. Problem 8
  118. - Root composer.json requires package/found 2.* -> satisfiable by package/found[2.0.0].
  119. - package/found 2.0.0 requires unstable/package2 2.* -> found unstable/package2[2.0.0-alpha] but it does not match your minimum-stability.
  120. Problem 9
  121. - Root composer.json requires package/found2 2.* -> satisfiable by package/found2[2.0.0].
  122. - package/found2 2.0.0 requires invalid/💩package * -> could not be found, it looks like its name is invalid, "💩" is not allowed in package names.
  123. Problem 10
  124. - Root composer.json requires package/found3 2.* -> satisfiable by package/found3[2.0.0].
  125. - package/found3 2.0.0 requires unstable/package2 2.* -> found unstable/package2[2.0.0-alpha] but it does not match your minimum-stability.
  126. Problem 11
  127. - Root composer.json requires package/found4 2.* -> satisfiable by package/found4[2.0.0].
  128. - package/found4 2.0.0 requires non-existent/pkg2 1.* -> could not be found in any version, there may be a typo in the package name.
  129. Problem 12
  130. - Root composer.json requires package/found6 2.* -> satisfiable by package/found6[2.0.0].
  131. - package/found6 2.0.0 requires stable-requiree-excluded/pkg2 1.0.1 -> found stable-requiree-excluded/pkg2[1.0.0] but it does not match your constraint.
  132. Problem 13
  133. - Root composer.json requires package/found7 2.* -> satisfiable by package/found7[2.0.0].
  134. - package/found7 2.0.0 requires php-64bit 1.0.1 -> your php-64bit version (%s) does not satisfy that requirement.
  135. Problem 14
  136. - Root composer.json requires requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  137. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> found dependency/pkg[1.0.0] but it conflicts with your root composer.json require (2.*).
  138. Problem 15
  139. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> found dependency/pkg[1.0.0] but it conflicts with your root composer.json require (2.*).
  140. - package/found5 2.0.0 requires requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  141. - Root composer.json requires package/found5 2.* -> satisfiable by package/found5[2.0.0].
  142. Potential causes:
  143. - A typo in the package name
  144. - The package is not available in a stable-enough version according to your minimum-stability setting
  145. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  146. - It's a private package and you forgot to add a custom repository to find it
  147. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  148. To enable extensions, verify that they are enabled in your .ini files:
  149. __inilist__
  150. You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
  151. --EXPECT--