conflict-between-root-and-dependent.test 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. Test conflicts between a dependency's requirements and the root requirements
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "requirer/pkg", "version": "1.0.0", "require": {
  10. "dependency/pkg": "1.0.0",
  11. "dependency/unstable-pkg": "1.0.0-dev"
  12. } },
  13. { "name": "dependency/pkg", "version": "2.0.0" },
  14. { "name": "dependency/pkg", "version": "1.0.0" }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "requirer/pkg": "1.*",
  20. "dependency/pkg": "2.*"
  21. }
  22. }
  23. --RUN--
  24. update
  25. --EXPECT-EXIT-CODE--
  26. 2
  27. --EXPECT-OUTPUT--
  28. Loading composer repositories with package information
  29. Updating dependencies
  30. Your requirements could not be resolved to an installable set of packages.
  31. Problem 1
  32. - Root composer.json requires requirer/pkg 1.* -> satisfiable by requirer/pkg[1.0.0].
  33. - requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> found dependency/pkg[1.0.0] but it conflicts with your root composer.json require (2.*).
  34. --EXPECT--