update-allow-list-patterns-without-dependencies.test 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --TEST--
  2. Update with a package whitelist only updates those packages 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. "unrelated/pkg": "1.*"
  29. }
  30. }
  31. --INSTALLED--
  32. [
  33. { "name": "fixed/pkg", "version": "1.0.0" },
  34. { "name": "whitelisted/pkg-component1", "version": "1.0.0" },
  35. { "name": "whitelisted/pkg-component2", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  36. { "name": "dependency/pkg", "version": "1.0.0" },
  37. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  38. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  39. ]
  40. --LOCK--
  41. {
  42. "packages": [
  43. { "name": "fixed/pkg", "version": "1.0.0" },
  44. { "name": "whitelisted/pkg-component1", "version": "1.0.0" },
  45. { "name": "whitelisted/pkg-component2", "version": "1.0.0", "require": { "dependency/pkg": "1.0.0" } },
  46. { "name": "dependency/pkg", "version": "1.0.0" },
  47. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  48. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  49. ],
  50. "packages-dev": [],
  51. "aliases": [],
  52. "minimum-stability": "dev",
  53. "stability-flags": {"a/a":20},
  54. "prefer-stable": false,
  55. "prefer-lowest": false
  56. }
  57. --RUN--
  58. update whitelisted/pkg-*
  59. --EXPECT--
  60. Upgrading whitelisted/pkg-component1 (1.0.0 => 1.1.0)
  61. Upgrading whitelisted/pkg-component2 (1.0.0 => 1.1.0)