update-allow-list-patterns-with-all-dependencies.test 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --TEST--
  2. Update with a package whitelist pattern and all-dependencies flag updates packages and their dependencies, even if defined as root dependency, matching the pattern
  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-component1", "version": "1.1.0" },
  12. { "name": "whitelisted/pkg-component1", "version": "1.0.0" },
  13. { "name": "whitelisted/pkg-component2", "version": "1.1.0", "require": { "dependency/pkg": "1.*" } },
  14. { "name": "whitelisted/pkg-component2", "version": "1.0.0", "require": { "dependency/pkg": "1.*" } },
  15. { "name": "dependency/pkg", "version": "1.1.0" },
  16. { "name": "dependency/pkg", "version": "1.0.0" },
  17. { "name": "unrelated/pkg", "version": "1.1.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  18. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  19. { "name": "unrelated/pkg-dependency", "version": "1.1.0" },
  20. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  21. ]
  22. }
  23. ],
  24. "require": {
  25. "fixed/pkg": "1.*",
  26. "whitelisted/pkg-component1": "1.*",
  27. "whitelisted/pkg-component2": "1.*",
  28. "dependency/pkg": "1.*",
  29. "unrelated/pkg": "1.*"
  30. }
  31. }
  32. --INSTALLED--
  33. [
  34. { "name": "fixed/pkg", "version": "1.0.0" },
  35. { "name": "whitelisted/pkg-component1", "version": "1.0.0" },
  36. { "name": "whitelisted/pkg-component2", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  37. { "name": "dependency/pkg", "version": "1.0.0" },
  38. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  39. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  40. ]
  41. --LOCK--
  42. {
  43. "packages": [
  44. { "name": "fixed/pkg", "version": "1.0.0" },
  45. { "name": "whitelisted/pkg-component1", "version": "1.0.0" },
  46. { "name": "whitelisted/pkg-component2", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  47. { "name": "dependency/pkg", "version": "1.0.0" },
  48. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  49. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  50. ],
  51. "packages-dev": [],
  52. "aliases": [],
  53. "minimum-stability": "dev",
  54. "stability-flags": [],
  55. "prefer-stable": false,
  56. "prefer-lowest": false,
  57. "platform": [],
  58. "platform-dev": []
  59. }
  60. --RUN--
  61. update whitelisted/pkg-* --with-all-dependencies
  62. --EXPECT--
  63. Upgrading whitelisted/pkg-component1 (1.0.0 => 1.1.0)
  64. Upgrading dependency/pkg (1.0.0 => 1.1.0)
  65. Upgrading whitelisted/pkg-component2 (1.0.0 => 1.1.0)