Search

Programming
Programming

We provide developers and engineers the guides and tutorials they...

Content
Content

Content is king. It's not just about how you're going to write, b...

Events
Events

Looking for an engaging connection with thousands of other people...

All tools
Laravel & PHP

Composer Semver Constraint Checker

Test whether a version satisfies a Composer constraint using composer/semver, the same library Composer uses.

10.2.1 satisfies ^10.0.

Examples

How it works

Composer constraints such as ^10.0, ~8.1, >=8.2 <8.5, and 1.2.3 || 1.2.4 follow the Composer semver rules, which differ slightly from npm. This checker calls Composer\Semver\Semver::satisfies() so the answer matches composer why / your lock file.

Related tools

Related reading

Your experience on this site will be improved by allowing cookies Cookie Policy