update-whitelist-locked-require.test 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  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", "version": "1.1.0", "require": { "dependency": "1.1.0", "fixed-dependency": "1.*" } },
  10. { "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0", "fixed-dependency": "1.*" } },
  11. { "name": "dependency", "version": "1.1.0" },
  12. { "name": "dependency", "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": "1.*",
  22. "fixed-dependency": "1.*"
  23. }
  24. }
  25. --INSTALLED--
  26. [
  27. { "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0", "fixed-dependency": "1.*" } },
  28. { "name": "dependency", "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. --RUN--
  33. update whitelisted dependency
  34. --EXPECT--
  35. Updating dependency (1.0.0) to dependency (1.1.0)
  36. Updating whitelisted (1.0.0) to whitelisted (1.1.0)