update-with-all-dependencies.test 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --TEST--
  2. See Github issue #6661 ( github.com/composer/composer/issues/6661 ).
  3. When `--with-all-dependencies` is used, Composer\Installer::whitelistUpdateDependencies should update the dependencies of all whitelisted packages, even if the dependency is a root requirement.
  4. --COMPOSER--
  5. {
  6. "repositories": [
  7. {
  8. "type": "package",
  9. "package": [
  10. { "name": "a/a", "version": "1.0.0" },
  11. { "name": "a/a", "version": "1.1.0" },
  12. { "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } },
  13. { "name": "b/b", "version": "1.1.0", "require": { "a/a": "~1.1" } }
  14. ]
  15. }
  16. ],
  17. "require": {
  18. "a/a": "~1.0",
  19. "b/b": "~1.0"
  20. }
  21. }
  22. --INSTALLED--
  23. [
  24. { "name": "a/a", "version": "1.0.0" },
  25. { "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } }
  26. ]
  27. --LOCK--
  28. {
  29. "packages": [
  30. { "name": "a/a", "version": "1.0.0" },
  31. { "name": "b/b", "version": "1.0.0", "require": { "a/a": "~1.0" } }
  32. ],
  33. "packages-dev": [],
  34. "aliases": [],
  35. "minimum-stability": "dev",
  36. "stability-flags": [],
  37. "prefer-stable": false,
  38. "prefer-lowest": false,
  39. "platform": [],
  40. "platform-dev": []
  41. }
  42. --RUN--
  43. update b/b --with-all-dependencies
  44. --EXPECT-OUTPUT--
  45. Loading composer repositories with package information
  46. Updating dependencies
  47. Lock file operations: 0 installs, 2 updates, 0 removals
  48. - Upgrading a/a (1.0.0 => 1.1.0)
  49. - Upgrading b/b (1.0.0 => 1.1.0)
  50. Writing lock file
  51. Installing dependencies from lock file (including require-dev)
  52. Package operations: 0 installs, 2 updates, 0 removals
  53. Generating autoload files
  54. --EXPECT--
  55. Upgrading a/a (1.0.0 => 1.1.0)
  56. Upgrading b/b (1.0.0 => 1.1.0)