Search

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