update-dev-packages-updates-repo-url.test 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --TEST--
  2. Updating dev packages where no reference change happened triggers a repo url change
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/a", "version": "dev-master",
  11. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  12. "source": { "reference": "newmaster", "type": "git", "url": "newurl" }
  13. },
  14. {
  15. "name": "b/b", "version": "dev-master",
  16. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  17. "source": { "reference": "master", "type": "git", "url": "newurl" }
  18. }
  19. ]
  20. }
  21. ],
  22. "require": {
  23. "a/a": "~2.1",
  24. "b/b": "~2.1"
  25. },
  26. "minimum-stability": "dev"
  27. }
  28. --INSTALLED--
  29. [
  30. {
  31. "name": "a/a", "version": "dev-master", "version_normalized": "9999999-dev",
  32. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  33. "source": { "reference": "oldmaster", "type": "git", "url": "oldurl" },
  34. "type": "library"
  35. },
  36. {
  37. "name": "b/b", "version": "dev-master", "version_normalized": "9999999-dev",
  38. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  39. "source": { "reference": "master", "type": "git", "url": "oldurl" },
  40. "type": "library"
  41. }
  42. ]
  43. --LOCK--
  44. {
  45. "packages": [
  46. {
  47. "name": "a/a", "version": "dev-master",
  48. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  49. "source": { "reference": "newmaster", "type": "git", "url": "oldurl" },
  50. "type": "library"
  51. },
  52. {
  53. "name": "b/b", "version": "dev-master",
  54. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  55. "source": { "reference": "master", "type": "git", "url": "oldurl" },
  56. "type": "library"
  57. }
  58. ],
  59. "packages-dev": [],
  60. "aliases": [],
  61. "minimum-stability": "dev",
  62. "stability-flags": [],
  63. "prefer-stable": false,
  64. "prefer-lowest": false,
  65. "platform": [],
  66. "platform-dev": []
  67. }
  68. --RUN--
  69. update
  70. --EXPECT-LOCK--
  71. {
  72. "packages": [
  73. {
  74. "name": "a/a", "version": "dev-master",
  75. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  76. "source": { "reference": "newmaster", "type": "git", "url": "newurl" },
  77. "type": "library"
  78. },
  79. {
  80. "name": "b/b", "version": "dev-master",
  81. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  82. "source": { "reference": "master", "type": "git", "url": "newurl" },
  83. "type": "library"
  84. }
  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. --EXPECT--
  96. Upgrading a/a (dev-master oldmaster => dev-master newmaster)