einenlum / composer-version-parser
A library to extract the potential higher version of a package from Composer requirements
1.0.1
2023-10-13 16:36 UTC
Requires
- php: ^8.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.4
README
This small library allows to parse the version requirements from a composer.json
file, allowing to get the probable version of a package (useful when no composer.lock
is present).
Examples:
More complex cases are not handled for now.
Install
composer require einenlum/composer-version-parser
Usage
<?php require_once __DIR__ . '/vendor/autoload.php'; use Einenlum\ComposerVersionParser\Parser; $parser = new Parser(); $parser->parse('v3.4.*'); // '3.4'