Closed nicolas-grekas closed 4 years ago
IMO the replace needs to stay as it to make sure that if some of your lib requires ocramius/package-versions 1.2.* for example it can be overridden by requiring this fork.
On the other hand, I guess releasing a new version with a narrower replace will allow composer to find either version 1.8.0 or 1.8.1 as a satisfactory solution, so it's probably fine.
This "replace" range makes the package conflict with dependent that conflict with e.g.
"ocramius/package-versions": "<1.3"
See https://github.com/getsentry/sentry-symfony/pull/347 for a real-world application of this issue.
This could also be considered as a bug in Composer itself since the range has a non-empty intersection with the complement of the conflicting rule. But I don't know how difficult it would be to make Composer consider this refinement.