update-allow-list-patterns-with-dependencies.test 3.1 KB

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