partial-update-from-lock.test 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --TEST--
  2. Partial update from lock file should update everything to the state of the lock, remove overly unstable packages
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "a/old", "version": "1.0.0" },
  10. { "name": "a/old", "version": "2.0.0" },
  11. { "name": "b/unstable", "version": "1.0.0", "require": {"f/dependency": "1.*"} },
  12. { "name": "b/unstable", "version": "1.1.0-alpha", "require": {"f/dependency": "1.*"} },
  13. { "name": "c/uptodate", "version": "1.0.0" },
  14. { "name": "d/removed", "version": "1.0.0" },
  15. { "name": "e/newreq", "version": "1.0.0" },
  16. { "name": "f/dependency", "version": "1.1.0" },
  17. { "name": "f/dependency", "version": "1.0.0" }
  18. ]
  19. }
  20. ],
  21. "require": {
  22. "a/old": "*",
  23. "b/unstable": "*",
  24. "c/uptodate": "*"
  25. }
  26. }
  27. --LOCK--
  28. {
  29. "packages": [
  30. { "name": "a/old", "version": "1.0.0" },
  31. { "name": "b/unstable", "version": "1.1.0-alpha", "require": {"f/dependency": "1.*"} },
  32. { "name": "c/uptodate", "version": "1.0.0" },
  33. { "name": "d/removed", "version": "1.0.0" },
  34. { "name": "e/newreq", "version": "1.0.0" },
  35. { "name": "f/dependency", "version": "1.0.0" }
  36. ],
  37. "packages-dev": [],
  38. "aliases": [],
  39. "minimum-stability": "stable",
  40. "stability-flags": {
  41. "b/unstable": 15
  42. },
  43. "prefer-stable": false,
  44. "prefer-lowest": false,
  45. "platform": [],
  46. "platform-dev": []
  47. }
  48. --INSTALLED--
  49. [
  50. { "name": "a/old", "version": "0.9.0" },
  51. { "name": "b/unstable", "version": "1.1.0-alpha", "require": {"f/dependency": "1.*"} },
  52. { "name": "c/uptodate", "version": "2.0.0" },
  53. { "name": "f/dependency", "version": "1.0.0" }
  54. ]
  55. --RUN--
  56. update b/unstable
  57. --EXPECT-LOCK--
  58. {
  59. "packages": [
  60. { "name": "a/old", "version": "1.0.0", "type": "library" },
  61. { "name": "b/unstable", "version": "1.0.0", "type": "library", "require": {"f/dependency": "1.*"} },
  62. { "name": "c/uptodate", "version": "1.0.0", "type": "library" },
  63. { "name": "d/removed", "version": "1.0.0", "type": "library" },
  64. { "name": "e/newreq", "version": "1.0.0", "type": "library" },
  65. { "name": "f/dependency", "version": "1.0.0", "type": "library" }
  66. ],
  67. "packages-dev": [],
  68. "aliases": [],
  69. "minimum-stability": "stable",
  70. "stability-flags": [],
  71. "prefer-stable": false,
  72. "prefer-lowest": false,
  73. "platform": [],
  74. "platform-dev": []
  75. }
  76. --EXPECT--
  77. Downgrading b/unstable (1.1.0-alpha) to b/unstable (1.0.0)
  78. Updating a/old (0.9.0) to a/old (1.0.0)
  79. Downgrading c/uptodate (2.0.0) to c/uptodate (1.0.0)
  80. Installing d/removed (1.0.0)
  81. Installing e/newreq (1.0.0)