ergebnis / version-constraint
Provides abstractions of version constraints.
Requires
- php: ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
Requires (Dev)
- composer/semver: ^3.4.4
- ergebnis/composer-normalize: ^2.52.0
- ergebnis/license: ^2.7.0
- ergebnis/php-cs-fixer-config: ^6.62.1
- ergebnis/phpstan-rules: ^2.13.1
- ergebnis/phpunit-slow-test-detector: ^2.24.0
- ergebnis/rector-rules: ^1.18.1
- fakerphp/faker: ^1.24.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.55
- phpstan/phpstan-deprecation-rules: ^2.0.4
- phpstan/phpstan-phpunit: ^2.0.16
- phpstan/phpstan-strict-rules: ^2.0.11
- phpunit/phpunit: ^9.6.34
- rector/rector: ^2.4.4
This package is auto-updated.
Last update: 2026-06-01 15:57:14 UTC
README
This project provides a composer package with abstractions of version constraints.
Installation
Run
composer require ergebnis/version-constraint
Usage
This project comes with the following components:
Composer\TildeVersionRange
Create a Composer\TildeVersionRange from a string
<?php declare(strict_types=1); use Ergebnis\VersionConstraint; $versionConstraint = VersionConstraint\Composer\TildeVersionRange::fromString('~1.0.0'); echo $versionConstraint->toString(); // ~1.0.0
Changelog
The maintainers of this project record notable changes to this project in a changelog.
Contributing
The maintainers of this project suggest following the contribution guide.
Code of Conduct
The maintainers of this project ask contributors to follow the code of conduct.
General Support Policy
The maintainers of this project provide limited support.
You can support the maintenance of this project by sponsoring @ergebnis.
PHP Version Support Policy
This project currently supports the following PHP versions:
- PHP 7.4 (has reached its end of life on November 28, 2022)
- PHP 8.0 (has reached its end of life on November 26, 2023)
- PHP 8.1 (has reached its end of life on December 31, 2025)
- PHP 8.2
- PHP 8.3
- PHP 8.4
- PHP 8.5
The maintainers of this project add support for a PHP version following its initial release and may drop support for a PHP version when it has reached its end of life.
Security Policy
This project has a security policy.
License
This project uses the MIT license.
Social
Follow @localheinz and @ergebnis on Twitter.