solver-problems.test 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. { "name": "api/provider", "description": "Provides the missing API", "version": "1.0.0", "provide": { "missing/provided-api": "1.*" } }
  52. ]
  53. }
  54. ],
  55. "require": {
  56. "package/found": "2.*",
  57. "package/found2": "2.*",
  58. "package/found3": "2.*",
  59. "package/found4": "2.*",
  60. "package/found5": "2.*",
  61. "package/found6": "2.*",
  62. "package/found7": "2.*",
  63. "missing/provided-api": "2.*",
  64. "conflict/requirer": "2.*",
  65. "conflict/requirer2": "2.*",
  66. "unstable/package": "2.*",
  67. "non-existent/pkg": "1.*",
  68. "requirer/pkg": "1.*",
  69. "dependency/pkg": "2.*",
  70. "stable-requiree-excluded/pkg": "1.0.1",
  71. "lib-xml": "1002.*",
  72. "lib-icu": "1001.*",
  73. "ext-xml": "1002.*",
  74. "php": "1"
  75. }
  76. }
  77. --INSTALLED--
  78. [
  79. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" },
  80. { "name": "stable-requiree-excluded/pkg2", "version": "1.0.0" }
  81. ]
  82. --LOCK--
  83. {
  84. "packages": [
  85. { "name": "stable-requiree-excluded/pkg", "version": "1.0.0" },
  86. { "name": "stable-requiree-excluded/pkg2", "version": "1.0.0" }
  87. ],
  88. "packages-dev": [],
  89. "aliases": [],
  90. "minimum-stability": "dev",
  91. "stability-flags": [],
  92. "prefer-stable": false,
  93. "prefer-lowest": false,
  94. "platform": [],
  95. "platform-dev": []
  96. }
  97. --RUN--
  98. update unstable/package requirer/pkg dependency/pkg conflict/requirer
  99. --EXPECT-EXIT-CODE--
  100. 2
  101. --EXPECT-OUTPUT--
  102. Loading composer repositories with package information
  103. Updating dependencies
  104. Your requirements could not be resolved to an installable set of packages.
  105. Problem 1
  106. - Root composer.json requires missing/provided-api 2.*, it could not be found in any version, but the following packages provide it:
  107. - api/provider Provides the missing API
  108. Consider requiring one of these to satisfy the missing/provided-api requirement.
  109. Problem 2
  110. - Root composer.json requires unstable/package 2.*, found unstable/package[2.0.0-alpha] but it does not match your minimum-stability.
  111. Problem 3
  112. - Root composer.json requires non-existent/pkg, it could not be found in any version, there may be a typo in the package name.
  113. Problem 4
  114. - 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 list it as an argument for the update command.
  115. Problem 5
  116. - 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.
  117. Problem 6
  118. - Root composer.json requires linked library lib-icu 1001.* but it has the wrong version installed, try upgrading the intl extension.
  119. Problem 7
  120. - Root composer.json requires PHP extension ext-xml 1002.* but it has the wrong version (%s) installed. Install or enable PHP's xml extension.
  121. Problem 8
  122. - Root composer.json requires php 1 but your php version (%s) does not satisfy that requirement.
  123. Problem 9
  124. - Root composer.json requires package/found 2.* -> satisfiable by package/found[2.0.0].
  125. - package/found 2.0.0 requires unstable/package2 2.* -> found unstable/package2[2.0.0-alpha] but it does not match your minimum-stability.
  126. Problem 10
  127. - Root composer.json requires package/found2 2.* -> satisfiable by package/found2[2.0.0].
  128. - 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.
  129. Problem 11
  130. - Root composer.json requires package/found3 2.* -> satisfiable by package/found3[2.0.0].
  131. - package/found3 2.0.0 requires unstable/package2 2.* -> found unstable/package2[2.0.0-alpha] but it does not match your minimum-stability.
  132. Problem 12
  133. - Root composer.json requires package/found4 2.* -> satisfiable by package/found4[2.0.0].
  134. - 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.
  135. Problem 13
  136. - Root composer.json requires package/found6 2.* -> satisfiable by package/found6[2.0.0].
  137. - 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 the constraint.
  138. Problem 14
  139. - Root composer.json requires package/found7 2.* -> satisfiable by package/found7[2.0.0].
  140. - package/found7 2.0.0 requires php-64bit 1.0.1 -> your php-64bit version (%s) does not satisfy that requirement.
  141. Problem 15
  142. - Root composer.json requires requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  143. - 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.*).
  144. Problem 16
  145. - 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.*).
  146. - package/found5 2.0.0 requires requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  147. - Root composer.json requires package/found5 2.* -> satisfiable by package/found5[2.0.0].
  148. Potential causes:
  149. - A typo in the package name
  150. - The package is not available in a stable-enough version according to your minimum-stability setting
  151. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  152. - It's a private package and you forgot to add a custom repository to find it
  153. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  154. To enable extensions, verify that they are enabled in your .ini files:
  155. __inilist__
  156. You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
  157. Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions.
  158. --EXPECT--