partial-update-from-lock.test 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. "prefer-stable": false,
  39. "platform": [],
  40. "platform-dev": []
  41. }
  42. --INSTALLED--
  43. [
  44. { "name": "a/old", "version": "0.9.0" },
  45. { "name": "b/unstable", "version": "1.1.0-alpha" },
  46. { "name": "c/uptodate", "version": "2.0.0" }
  47. ]
  48. --RUN--
  49. update b/unstable
  50. --EXPECT-LOCK--
  51. {
  52. "packages": [
  53. { "name": "a/old", "version": "1.0.0", "type": "library" },
  54. { "name": "b/unstable", "version": "1.0.0", "type": "library" },
  55. { "name": "c/uptodate", "version": "1.0.0", "type": "library" }
  56. ],
  57. "packages-dev": [],
  58. "aliases": [],
  59. "minimum-stability": "stable",
  60. "stability-flags": [],
  61. "prefer-stable": false,
  62. "platform": [],
  63. "platform-dev": []
  64. }
  65. --EXPECT--
  66. Updating a/old (0.9.0) to a/old (1.0.0)
  67. Updating c/uptodate (2.0.0) to c/uptodate (1.0.0)
  68. Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)