github-issues-4795-2.test 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. --LOCK--
  29. {
  30. "packages": [
  31. {
  32. "name": "a/a", "version": "1.0.0"
  33. },
  34. {
  35. "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" }
  36. }
  37. ],
  38. "packages-dev": [],
  39. "aliases": [],
  40. "minimum-stability": "stable",
  41. "stability-flags": {},
  42. "prefer-stable": false,
  43. "prefer-lowest": false,
  44. "platform": [],
  45. "platform-dev": []
  46. }
  47. --RUN--
  48. update a/a b/b --with-dependencies
  49. --EXPECT-OUTPUT--
  50. Loading composer repositories with package information
  51. Updating dependencies
  52. Lock file operations: 0 installs, 2 updates, 0 removals
  53. - Upgrading a/a (1.0.0 => 1.1.0)
  54. - Upgrading b/b (1.0.0 => 1.1.0)
  55. Writing lock file
  56. Installing dependencies from lock file (including require-dev)
  57. Package operations: 0 installs, 2 updates, 0 removals
  58. Generating autoload files
  59. --EXPECT--
  60. Upgrading a/a (1.0.0 => 1.1.0)
  61. Upgrading b/b (1.0.0 => 1.1.0)