update-allow-list-with-dependencies-new-requirement.test 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --TEST--
  2. When partially updating a package to a newer version and the new version has a new requirement for a package we already have installed, mark it for update
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "root/pkg1", "version": "1.0.0", "require": { "current/dep": "^1.0" } },
  10. { "name": "root/pkg1", "version": "1.2.0", "require": { "current/dep": "^1.0" } },
  11. { "name": "current/dep", "version": "1.0.0" },
  12. { "name": "current/dep", "version": "1.2.0" },
  13. { "name": "root/pkg2", "version": "1.0.0" },
  14. { "name": "root/pkg2", "version": "1.2.0", "require": { "current/dep": "^1.2" } }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "root/pkg1": "1.*",
  20. "root/pkg2": "1.*"
  21. }
  22. }
  23. --INSTALLED--
  24. [
  25. { "name": "root/pkg1", "version": "1.0.0", "require": { "current/dep": "^1.0" } },
  26. { "name": "current/dep", "version": "1.0.0" },
  27. { "name": "root/pkg2", "version": "1.0.0" }
  28. ]
  29. --LOCK--
  30. {
  31. "packages": [
  32. { "name": "root/pkg1", "version": "1.0.0", "require": { "current/dep": "^1.0" } },
  33. { "name": "current/dep", "version": "1.0.0" },
  34. { "name": "root/pkg2", "version": "1.0.0" }
  35. ],
  36. "packages-dev": [],
  37. "aliases": [],
  38. "minimum-stability": "dev",
  39. "stability-flags": [],
  40. "prefer-stable": false,
  41. "prefer-lowest": false,
  42. "platform": [],
  43. "platform-dev": []
  44. }
  45. --RUN--
  46. update root/pkg2 --with-dependencies
  47. --EXPECT--
  48. Upgrading current/dep (1.0.0 => 1.2.0)
  49. Upgrading root/pkg2 (1.0.0 => 1.2.0)