partial-update-installs-from-lock-even-missing.test 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. --TEST--
  2. Partial update installs from lock even if package don't exist in public repo anymore
  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.3.x-dev" } },
  12. "source": { "reference": "newmaster-a2", "type": "git", "url": "" }
  13. },
  14. {
  15. "name": "b/b", "version": "dev-master",
  16. "extra": { "branch-alias": { "dev-master": "2.3.x-dev" } },
  17. "source": { "reference": "newmaster-b2", "type": "git", "url": "" },
  18. "require": { "a/a": "dev-master" }
  19. }
  20. ]
  21. }
  22. ],
  23. "require": {
  24. "a/a": "~2.1",
  25. "b/b": "~2.1"
  26. },
  27. "minimum-stability": "dev"
  28. }
  29. --INSTALLED--
  30. [
  31. {
  32. "name": "a/a", "version": "dev-master", "version_normalized": "9999999-dev",
  33. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  34. "source": { "reference": "oldmaster-a", "type": "git", "url": "" },
  35. "type": "library"
  36. },
  37. {
  38. "name": "b/b", "version": "dev-master", "version_normalized": "9999999-dev",
  39. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  40. "source": { "reference": "oldmaster-b", "type": "git", "url": "" },
  41. "require": { "a/a": "dev-master" },
  42. "type": "library"
  43. }
  44. ]
  45. --LOCK--
  46. {
  47. "packages": [
  48. {
  49. "name": "a/a", "version": "dev-master",
  50. "extra": { "branch-alias": { "dev-master": "2.2.x-dev" } },
  51. "source": { "reference": "newmaster-a", "type": "git", "url": "" },
  52. "type": "library"
  53. },
  54. {
  55. "name": "b/b", "version": "dev-master",
  56. "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } },
  57. "source": { "reference": "oldmaster-b", "type": "git", "url": "" },
  58. "require": { "a/a": "dev-master" },
  59. "type": "library"
  60. }
  61. ],
  62. "packages-dev": [],
  63. "aliases": [],
  64. "minimum-stability": "dev",
  65. "stability-flags": [],
  66. "prefer-stable": false,
  67. "prefer-lowest": false,
  68. "platform": [],
  69. "platform-dev": []
  70. }
  71. --RUN--
  72. update b/b
  73. --EXPECT-LOCK--
  74. {
  75. "packages": [
  76. {
  77. "name": "a/a", "version": "dev-master",
  78. "extra": { "branch-alias": { "dev-master": "2.2.x-dev" } },
  79. "source": { "reference": "newmaster-a", "type": "git", "url": "" },
  80. "type": "library"
  81. },
  82. {
  83. "name": "b/b", "version": "dev-master",
  84. "extra": { "branch-alias": { "dev-master": "2.3.x-dev" } },
  85. "source": { "reference": "newmaster-b2", "type": "git", "url": "" },
  86. "require": { "a/a": "dev-master" },
  87. "type": "library"
  88. }
  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. --EXPECT--
  100. Marking a/a (2.1.x-dev oldmaster-a) as uninstalled, alias of a/a (dev-master oldmaster-a)
  101. Marking b/b (2.1.x-dev oldmaster-b) as uninstalled, alias of b/b (dev-master oldmaster-b)
  102. Upgrading a/a (dev-master oldmaster-a => dev-master newmaster-a)
  103. Marking a/a (2.2.x-dev newmaster-a) as installed, alias of a/a (dev-master newmaster-a)
  104. Upgrading b/b (dev-master oldmaster-b => dev-master newmaster-b2)
  105. Marking b/b (2.3.x-dev newmaster-b2) as installed, alias of b/b (dev-master newmaster-b2)