update-mirrors-changes-url.test 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. --TEST--
  2. Update mirrors updates URLs for all packages if they have changed without updating versions
  3. a/a is dev and gets everything updated as it updates to a new ref
  4. b/b is a tag and gets everything updated by updating the package URL directly
  5. c/c is a tag and not whitelisted and gets the new URL but keeps its old ref
  6. d/d is dev but with a #ref so it should get URL updated but not the reference
  7. e/e is dev and newly installed with a #ref so it should get the correct URL but with the #111 ref
  8. e/e is dev but not whitelisted and gets the new URL but keeps its old ref
  9. g/g is dev and installed in a different ref than the #ref, so it gets updated and gets the new URL but not the new ref
  10. --COMPOSER--
  11. {
  12. "repositories": [
  13. {
  14. "type": "package",
  15. "package": [
  16. {
  17. "name": "a/a", "version": "dev-master",
  18. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/a/newa", "type": "git" },
  19. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/a/newa/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  20. },
  21. {
  22. "name": "b/b", "version": "2.0.3",
  23. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/b/newb", "type": "git" },
  24. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/b/newb/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  25. },
  26. {
  27. "name": "c/c", "version": "1.0.0",
  28. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/c/newc", "type": "git" },
  29. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/c/newc/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  30. },
  31. {
  32. "name": "d/d", "version": "dev-master",
  33. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/d/newd", "type": "git" },
  34. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/d/newd/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  35. },
  36. {
  37. "name": "e/e", "version": "dev-master",
  38. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/e/newe", "type": "git" },
  39. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/e/newe/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  40. },
  41. {
  42. "name": "f/f", "version": "dev-master",
  43. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/f/newf", "type": "git" },
  44. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/f/newf/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  45. },
  46. {
  47. "name": "g/g", "version": "dev-master",
  48. "source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/g/newg", "type": "git" },
  49. "dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/g/newg/zipball/2222222222222222222222222222222222222222", "type": "zip" }
  50. }
  51. ]
  52. }
  53. ],
  54. "require": {
  55. "a/a": "dev-master",
  56. "b/b": "2.0.3",
  57. "c/c": "1.0.0",
  58. "d/d": "dev-master#1111111111111111111111111111111111111111",
  59. "e/e": "dev-master#1111111111111111111111111111111111111111",
  60. "f/f": "dev-master",
  61. "g/g": "dev-master#1111111111111111111111111111111111111111"
  62. }
  63. }
  64. --INSTALLED--
  65. [
  66. {
  67. "name": "a/a", "version": "dev-master",
  68. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/a", "type": "git" },
  69. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/a/zipball/1111111111111111111111111111111111111111", "type": "zip" }
  70. },
  71. {
  72. "name": "b/b", "version": "2.0.3",
  73. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/b", "type": "git" },
  74. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/b/zipball/1111111111111111111111111111111111111111", "type": "zip" }
  75. },
  76. {
  77. "name": "c/c", "version": "1.0.0",
  78. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/c", "type": "git" },
  79. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/c/zipball/1111111111111111111111111111111111111111", "type": "zip" }
  80. },
  81. {
  82. "name": "d/d", "version": "dev-master",
  83. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/d", "type": "git" },
  84. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/d/zipball/1111111111111111111111111111111111111111", "type": "zip" }
  85. },
  86. {
  87. "name": "f/f", "version": "dev-master",
  88. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" },
  89. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip" }
  90. },
  91. {
  92. "name": "g/g", "version": "dev-master",
  93. "source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" },
  94. "dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip" }
  95. }
  96. ]
  97. --LOCK--
  98. {
  99. "packages": [
  100. {
  101. "name": "a/a", "version": "dev-master",
  102. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/a", "type": "git" },
  103. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/a/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  104. "type": "library"
  105. },
  106. {
  107. "name": "b/b", "version": "2.0.3",
  108. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/b", "type": "git" },
  109. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/b/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  110. "type": "library"
  111. },
  112. {
  113. "name": "c/c", "version": "1.0.0",
  114. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/c", "type": "git" },
  115. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/c/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  116. "type": "library"
  117. },
  118. {
  119. "name": "d/d", "version": "dev-master",
  120. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/d", "type": "git" },
  121. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/d/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  122. "type": "library"
  123. },
  124. {
  125. "name": "f/f", "version": "dev-master",
  126. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" },
  127. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  128. "type": "library"
  129. },
  130. {
  131. "name": "g/g", "version": "dev-master",
  132. "source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" },
  133. "dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip" },
  134. "type": "library"
  135. }
  136. ],
  137. "packages-dev": [],
  138. "aliases": [],
  139. "minimum-stability": "stable",
  140. "stability-flags": {},
  141. "prefer-stable": false,
  142. "prefer-lowest": false,
  143. "platform": [],
  144. "platform-dev": []
  145. }
  146. --EXPECT-LOCK--
  147. {
  148. "packages": [
  149. {
  150. "name": "a/a", "version": "dev-master",
  151. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/newa", "type": "git" },
  152. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/newa/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  153. "type": "library"
  154. },
  155. {
  156. "name": "b/b", "version": "2.0.3",
  157. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/newb", "type": "git" },
  158. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/newb/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  159. "type": "library"
  160. },
  161. {
  162. "name": "c/c", "version": "1.0.0",
  163. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/newc", "type": "git" },
  164. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/newc/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  165. "type": "library"
  166. },
  167. {
  168. "name": "d/d", "version": "dev-master",
  169. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/newd", "type": "git" },
  170. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/newd/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  171. "type": "library"
  172. },
  173. {
  174. "name": "f/f", "version": "dev-master",
  175. "source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/newf", "type": "git" },
  176. "dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/newf/zipball/1111111111111111111111111111111111111111", "type": "zip" },
  177. "type": "library"
  178. },
  179. {
  180. "name": "g/g", "version": "dev-master",
  181. "source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/newg", "type": "git" },
  182. "dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/newg/zipball/0000000000000000000000000000000000000000", "type": "zip" },
  183. "type": "library"
  184. }
  185. ],
  186. "packages-dev": [],
  187. "aliases": [],
  188. "minimum-stability": "stable",
  189. "stability-flags": {
  190. "a/a": 20,
  191. "d/d": 20,
  192. "e/e": 20,
  193. "f/f": 20,
  194. "g/g": 20
  195. },
  196. "prefer-stable": false,
  197. "prefer-lowest": false,
  198. "platform": [],
  199. "platform-dev": []
  200. }
  201. --RUN--
  202. update mirrors
  203. --EXPECT--