provider-conflicts3.test 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --TEST--
  2. Test that a replacer can not be installed together with another version of the package it replaces
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {"name": "replacer/pkg", "version": "2.0.0", "replace": { "regular/pkg": "self.version" }},
  10. {"name": "replacer/pkg", "version": "2.0.1", "replace": { "regular/pkg": "self.version" }},
  11. {"name": "replacer/pkg", "version": "2.0.2", "replace": { "regular/pkg": "self.version" }},
  12. {"name": "replacer/pkg", "version": "2.0.3", "replace": { "regular/pkg": "self.version" }},
  13. {"name": "regular/pkg", "version": "1.0.0"},
  14. {"name": "regular/pkg", "version": "1.0.1"},
  15. {"name": "regular/pkg", "version": "1.0.2"},
  16. {"name": "regular/pkg", "version": "1.0.3"},
  17. {"name": "regular/pkg", "version": "2.0.0"},
  18. {"name": "regular/pkg", "version": "2.0.1"}
  19. ]
  20. }
  21. ],
  22. "require": {
  23. "regular/pkg": "1.*",
  24. "replacer/pkg": "2.*"
  25. }
  26. }
  27. --RUN--
  28. update
  29. --EXPECT-EXIT-CODE--
  30. 2
  31. --EXPECT-OUTPUT--
  32. Loading composer repositories with package information
  33. Updating dependencies
  34. Your requirements could not be resolved to an installable set of packages.
  35. Problem 1
  36. - Conclusion: don't install regular/pkg 1.0.3, learned rules:
  37. - Root composer.json requires replacer/pkg 2.* -> satisfiable by replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3].
  38. - Only one of these can be installed: regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3], replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3]. replacer/pkg replaces regular/pkg and thus cannot coexist with it.
  39. - Conclusion: don't install regular/pkg 1.0.2, learned rules:
  40. - Root composer.json requires replacer/pkg 2.* -> satisfiable by replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3].
  41. - Only one of these can be installed: regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3], replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3]. replacer/pkg replaces regular/pkg and thus cannot coexist with it.
  42. - Conclusion: don't install regular/pkg 1.0.1, learned rules:
  43. - Root composer.json requires replacer/pkg 2.* -> satisfiable by replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3].
  44. - Only one of these can be installed: regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3], replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3]. replacer/pkg replaces regular/pkg and thus cannot coexist with it.
  45. - Only one of these can be installed: regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3], replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3]. replacer/pkg replaces regular/pkg and thus cannot coexist with it.
  46. - Root composer.json requires regular/pkg 1.* -> satisfiable by regular/pkg[1.0.0, 1.0.1, 1.0.2, 1.0.3].
  47. - Root composer.json requires replacer/pkg 2.* -> satisfiable by replacer/pkg[2.0.0, 2.0.1, 2.0.2, 2.0.3].
  48. --EXPECT--