replaced-packages-should-not-be-installed-when-installing-from-lock.test 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. Requiring a replaced package in a version, that is not provided by the replacing package, should result in a conflict, when installing from lock
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
  10. { "name": "foo/replaced", "version": "1.0.0" },
  11. { "name": "foo/replaced", "version": "2.0.0" }
  12. ]
  13. }
  14. ],
  15. "require": {
  16. "foo/original": "1.0.0",
  17. "foo/replaced": "2.0.0"
  18. }
  19. }
  20. --LOCK--
  21. {
  22. "packages": [
  23. { "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"}, "type": "library" },
  24. { "name": "foo/replaced", "version": "2.0.0", "type": "library" }
  25. ],
  26. "packages-dev": [],
  27. "aliases": [],
  28. "minimum-stability": "stable",
  29. "stability-flags": {},
  30. "prefer-stable": false,
  31. "prefer-lowest": false,
  32. "platform": [],
  33. "platform-dev": []
  34. }
  35. --RUN--
  36. install
  37. --EXPECT-EXIT-CODE--
  38. 2
  39. --EXPECT--