partial-update-from-lock.test 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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" },
  12. { "name": "b/unstable", "version": "1.1.0-alpha" },
  13. { "name": "c/uptodate", "version": "1.0.0" },
  14. { "name": "d/removed", "version": "1.0.0" }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "a/old": "*",
  20. "b/unstable": "*",
  21. "c/uptodate": "*"
  22. }
  23. }
  24. --LOCK--
  25. {
  26. "packages": [
  27. { "name": "a/old", "version": "1.0.0" },
  28. { "name": "b/unstable", "version": "1.1.0-alpha" },
  29. { "name": "c/uptodate", "version": "1.0.0" },
  30. { "name": "d/removed", "version": "1.0.0" }
  31. ],
  32. "packages-dev": [],
  33. "aliases": [],
  34. "minimum-stability": "stable",
  35. "stability-flags": {
  36. "b/unstable": 15
  37. },
  38. "platform": [],
  39. "platform-dev": []
  40. }
  41. --INSTALLED--
  42. [
  43. { "name": "a/old", "version": "0.9.0" },
  44. { "name": "b/unstable", "version": "1.1.0-alpha" },
  45. { "name": "c/uptodate", "version": "2.0.0" }
  46. ]
  47. --RUN--
  48. update b/unstable
  49. --EXPECT-LOCK--
  50. {
  51. "packages": [
  52. { "name": "a/old", "version": "1.0.0", "type": "library" },
  53. { "name": "b/unstable", "version": "1.0.0", "type": "library" },
  54. { "name": "c/uptodate", "version": "1.0.0", "type": "library" }
  55. ],
  56. "packages-dev": [],
  57. "aliases": [],
  58. "minimum-stability": "stable",
  59. "stability-flags": [],
  60. "platform": [],
  61. "platform-dev": []
  62. }
  63. --EXPECT--
  64. Updating a/old (0.9.0) to a/old (1.0.0)
  65. Updating c/uptodate (2.0.0) to c/uptodate (1.0.0)
  66. Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)