problems-reduce-versions.test 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --TEST--
  2. Test the error output minifies version lists
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {"name": "a/a", "version": "1.0.0", "require": {"b/b": "1.0.0"}},
  10. {"name": "b/b", "version": "1.0.0"},
  11. {"name": "b/b", "version": "1.0.1"},
  12. {"name": "b/b", "version": "1.0.2"},
  13. {"name": "b/b", "version": "1.0.3"},
  14. {"name": "b/b", "version": "v1.1.4"},
  15. {"name": "b/b", "version": "1.0.4"},
  16. {"name": "b/b", "version": "1.0.5"},
  17. {"name": "b/b", "version": "1.0.6"},
  18. {"name": "b/b", "version": "1.0.7"},
  19. {"name": "b/b", "version": "1.1.0"},
  20. {"name": "b/b", "version": "2.0.5"},
  21. {"name": "b/b", "version": "1.0.8"},
  22. {"name": "b/b", "version": "1.0.9"},
  23. {"name": "b/b", "version": "1.1.1"},
  24. {"name": "b/b", "version": "1.1.2"},
  25. {"name": "b/b", "version": "1.1.3"},
  26. {"name": "b/b", "version": "1.1.5"},
  27. {"name": "b/b", "version": "v1.1.6"},
  28. {"name": "b/b", "version": "1.1.7-alpha"},
  29. {"name": "b/b", "version": "1.1.8"},
  30. {"name": "b/b", "version": "1.1.9"},
  31. {"name": "b/b", "version": "1.2.0"},
  32. {"name": "b/b", "version": "1.2.2"},
  33. {"name": "b/b", "version": "1.2.3"},
  34. {"name": "b/b", "version": "1.2.4"},
  35. {"name": "b/b", "version": "1.2.5"},
  36. {"name": "b/b", "version": "1.2.6"},
  37. {"name": "b/b", "version": "1.2.1"},
  38. {"name": "b/b", "version": "1.2.7"},
  39. {"name": "b/b", "version": "1.2.8"},
  40. {"name": "b/b", "version": "1.2.9"},
  41. {"name": "b/b", "version": "2.0.0"},
  42. {"name": "b/b", "version": "2.0.1"},
  43. {"name": "b/b", "version": "2.0.2"},
  44. {"name": "b/b", "version": "2.0.3"},
  45. {"name": "b/b", "version": "2.0.4"},
  46. {"name": "b/b", "version": "2.0.6"},
  47. {"name": "b/b", "version": "2.0.7"},
  48. {"name": "b/b", "version": "2.0.8"},
  49. {"name": "b/b", "version": "2.0.9"},
  50. {"name": "b/b", "version": "2.1.0"},
  51. {"name": "b/b", "version": "2.1.1"},
  52. {"name": "b/b", "version": "2.1.2"},
  53. {"name": "b/b", "version": "2.1.3"},
  54. {"name": "b/b", "version": "2.1.4"},
  55. {"name": "b/b", "version": "2.1.5"},
  56. {"name": "b/b", "version": "2.1.6"},
  57. {"name": "b/b", "version": "2.1.7"},
  58. {"name": "b/b", "version": "2.1.8"},
  59. {"name": "b/b", "version": "2.1.9"},
  60. {"name": "b/b", "version": "2.2.0"},
  61. {"name": "b/b", "version": "2.2.1"},
  62. {"name": "b/b", "version": "2.2.2"},
  63. {"name": "b/b", "version": "2.2.3"},
  64. {"name": "b/b", "version": "2.2.4"},
  65. {"name": "b/b", "version": "2.2.5"},
  66. {"name": "b/b", "version": "2.2.6"},
  67. {"name": "b/b", "version": "2.2.7"},
  68. {"name": "b/b", "version": "2.2.8"},
  69. {"name": "b/b", "version": "2.2.9"},
  70. {"name": "b/b", "version": "2.3.0-RC"},
  71. {"name": "b/b", "version": "3.0.0"},
  72. {"name": "b/b", "version": "3.0.1"},
  73. {"name": "b/b", "version": "3.0.2"},
  74. {"name": "b/b", "version": "3.0.3"},
  75. {"name": "b/b", "version": "4.0.0"}
  76. ]
  77. }
  78. ],
  79. "require": {
  80. "a/a": "*",
  81. "b/b": "^1.1 || ^2.0 || ^3.0"
  82. },
  83. "minimum-stability": "dev"
  84. }
  85. --LOCK--
  86. {
  87. "packages": [
  88. {"name": "b/b", "version": "1.0.0"}
  89. ],
  90. "packages-dev": [],
  91. "aliases": [],
  92. "minimum-stability": "dev",
  93. "stability-flags": [],
  94. "prefer-stable": false,
  95. "prefer-lowest": false,
  96. "platform": [],
  97. "platform-dev": []
  98. }
  99. --RUN--
  100. update a/a
  101. --EXPECT-EXIT-CODE--
  102. 2
  103. --EXPECT-OUTPUT--
  104. Loading composer repositories with package information
  105. Updating dependencies
  106. Your requirements could not be resolved to an installable set of packages.
  107. Problem 1
  108. - Root composer.json requires b/b ^1.1 || ^2.0 || ^3.0, found b/b[1.1.0, ..., 1.2.9, 2.0.0, ..., 2.3.0-RC, 3.0.0, 3.0.1, 3.0.2, 3.0.3] 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.
  109. Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions.
  110. --EXPECT--