herrera-io / version
1.1.1
2014-05-27 05:29 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- herrera-io/phpunit-test-case: 1.*
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2021-12-07 01:37:52 UTC
README
Version是一个用于创建、编辑和比较语义版本号的库。目前,支持语义版本规范的v2.0.0版本。
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();