As part of T99084: Allow extensions to specify which MW core versions they support in extension.json, we will be re-using the composer LinkConstraint code, which has now been split out into a separate composer/semver library.
Tree: https://github.com/composer/semver/tree/0.1.0
Before adding to mediawiki/vendor, this needs a security review, so assigned to Chris.