herrera-io/version
PHP library for Semantic Versioning (SemVer 2.0.0): parse versions into a builder, increment major/minor/patch, edit pre-release/build metadata, validate formats, compare versions, and dump back to strings for release tooling.
Version is a library for creating, editing, and comparing semantic version numbers. Currently, v2.0.0 of the Semantic Versioning specification is supported.
use Herrera\Version\Dumper;
use Herrera\Version\Parser;
$builder = Parser::toBuilder('1.2.3-alpha+2');
$builder->incrementMajor();
$builder->clearBuild();
$builder->clearPreRelease();
echo Dumper::toString($builder); // echoes "2.0.0"
$finalVersion = $builder->getVersion();
How can I help you explore Laravel packages today?