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

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. update
  23. --EXPECT-OUTPUT--
  24. Loading composer repositories with package information
  25. Updating dependencies
  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 -> could not be found in any version, there may be a typo in the package name.
  29. - b/b 1.0.0 requires c/c 1.* -> satisfiable by c/c[1.0.0].
  30. - Root composer.json requires 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. - It's a private package and you forgot to add a custom repository to find it
  36. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  37. --EXPECT-EXIT-CODE--
  38. 2
  39. --EXPECT--