github-issues-4795.test 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. See Github issue #4795 ( github.com/composer/composer/issues/4795 ).
  3. Composer\Installer::whitelistUpdateDependencies intentionally ignores root requirements even if said package is also a
  4. dependency of one the requirements that is whitelisted for update.
  5. --COMPOSER--
  6. {
  7. "repositories": [
  8. {
  9. "type": "package",
  10. "package": [
  11. { "name": "a/a", "version": "1.0.0" },
  12. { "name": "a/a", "version": "1.1.0" },
  13. { "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } },
  14. { "name": "b/b", "version": "1.1.0", "require": { "a/b": "~1.1" } }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "a/a": "~1.0",
  20. "b/b": "~1.0"
  21. }
  22. }
  23. --INSTALLED--
  24. [
  25. { "name": "a/a", "version": "1.0.0" },
  26. { "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } }
  27. ]
  28. --RUN--
  29. update b/b --with-dependencies
  30. --EXPECT-OUTPUT--
  31. <warning>Dependency "a/a" is also a root requirement, but is not explicitly whitelisted. Ignoring.</warning>
  32. Loading composer repositories with package information
  33. Updating dependencies (including require-dev)
  34. Nothing to install or update
  35. Writing lock file
  36. Generating autoload files
  37. --EXPECT--