composer/semver
Composer Semver is a PHP library for parsing and validating version constraints, normalizing versions, and comparing releases. Extracted from Composer, it supports semver-style rules where possible while staying compatible with PHP’s version_compare.
^1.2.3, or compare versions with stability flags (e.g., 1.0.0-beta)Executives: "This MIT-licensed package is the industry standard for version handling in PHP, used by Composer itself. It eliminates the risk and cost of building custom version logic, ensuring accurate dependency resolution and reducing time-to-market for features like plugin compatibility checks. With 3,287 GitHub stars and active maintenance, it’s battle-tested and zero-risk for our product."
Engineering: "It’s a lightweight, battle-tested library with robust CI/CD and tests. Handles edge cases like dev versions, alpha/beta tags, and complex constraints (e.g., ^2.x-dev) that would take weeks to implement correctly. Integrates in minutes via composer require, saving engineering hours while ensuring reliability. PHPStan and PHPUnit coverage guarantees code quality."
How can I help you explore Laravel packages today?