update-allow-list-with-dependencies.test 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --TEST--
  2. Update with a package whitelist only updates those packages and their dependencies listed as command arguments
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "fixed/pkg", "version": "1.1.0" },
  10. { "name": "fixed/pkg", "version": "1.0.0" },
  11. { "name": "whitelisted/pkg", "version": "1.1.0", "require": { "dependency/pkg": "1.1.0" } },
  12. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  13. { "name": "dependency/pkg", "version": "1.1.0" },
  14. { "name": "dependency/pkg", "version": "1.0.0" },
  15. { "name": "unrelated/pkg", "version": "1.1.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  16. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  17. { "name": "unrelated/pkg-dependency", "version": "1.1.0" },
  18. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  19. ]
  20. }
  21. ],
  22. "require": {
  23. "fixed/pkg": "1.*",
  24. "whitelisted/pkg": "1.*",
  25. "unrelated/pkg": "1.*"
  26. }
  27. }
  28. --INSTALLED--
  29. [
  30. { "name": "fixed/pkg", "version": "1.0.0" },
  31. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  32. { "name": "dependency/pkg", "version": "1.0.0" },
  33. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  34. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  35. ]
  36. --LOCK--
  37. {
  38. "packages": [
  39. { "name": "fixed/pkg", "version": "1.0.0" },
  40. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  41. { "name": "dependency/pkg", "version": "1.0.0" },
  42. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  43. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  44. ],
  45. "packages-dev": [],
  46. "aliases": [],
  47. "minimum-stability": "dev",
  48. "stability-flags": {"a/a":20},
  49. "prefer-stable": false,
  50. "prefer-lowest": false
  51. }
  52. --RUN--
  53. update whitelisted/pkg --with-dependencies
  54. --EXPECT--
  55. Upgrading dependency/pkg (1.0.0 => 1.1.0)
  56. Upgrading whitelisted/pkg (1.0.0 => 1.1.0)