update-allow-list-locked-require.test 2.2 KB

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