github-issues-4795-2.test 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --TEST--
  2. See Github issue #4795 ( github.com/composer/composer/issues/4795 ).
  3. Composer\Installer::whitelistUpdateDependencies should not output a warning for dependencies that need to be updated
  4. that are also a root package, when that root package is also explicitly whitelisted.
  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/a": "~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 a/a b/b --with-dependencies
  30. --EXPECT-OUTPUT--
  31. Loading composer repositories with package information
  32. Updating dependencies (including require-dev)
  33. Package operations: 0 installs, 2 updates, 0 removals
  34. Writing lock file
  35. Generating autoload files
  36. --EXPECT--
  37. Updating a/a (1.0.0) to a/a (1.1.0)
  38. Updating b/b (1.0.0) to b/b (1.1.0)