broken-deps-do-not-replace.test 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Broken dependencies should not lead to a replacer being installed which is not mentioned by name
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "a/a", "version": "1.0.0" },
  10. { "name": "b/b", "version": "1.0.0", "require": {"c/c": "1.*"} },
  11. { "name": "c/c", "version": "1.0.0", "replace": {"a/a": "1.0.0" },"require":{"x/x": "1.0"}},
  12. { "name": "d/d", "version": "1.0.0", "replace": {"a/a": "1.0.0", "c/c":"1.0.0" }}
  13. ]
  14. }
  15. ],
  16. "require": {
  17. "a/a": "1.*",
  18. "b/b": "1.*"
  19. }
  20. }
  21. --RUN--
  22. install
  23. --EXPECT-OUTPUT--
  24. Loading composer repositories with package information
  25. Updating dependencies (including require-dev)
  26. Your requirements could not be resolved to an installable set of packages.
  27. Problem 1
  28. - c/c 1.0.0 requires x/x 1.0 -> no matching package found.
  29. - b/b 1.0.0 requires c/c 1.* -> satisfiable by c/c[1.0.0].
  30. - Installation request for b/b 1.* -> satisfiable by b/b[1.0.0].
  31. Potential causes:
  32. - A typo in the package name
  33. - The package is not available in a stable-enough version according to your minimum-stability setting
  34. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  35. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  36. --EXPECT-EXIT-CODE--
  37. 2
  38. --EXPECT--