Skip to content
seworqsPublic

About

A type-safe, chainable semantic versioning implementation for PHP with support for bumping versions, handling pre-releases, and comparing versions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

SEworqs SemVer

A type-safe, chainable semantic versioning implementation for PHP with support for bumping versions, handling pre-releases, and comparing versions.

Installation

Install via Composer.

$> composer require seworqs/semver

Usage

use Seworqs\Semver;
use Seworqs\Semver\Enum\EnumBumpReleaseType;
use Seworqs\Semver\Enum\EnumBumpPreReleaseType;

// Create a semver from a string.
$semver = Semver::fromString('2.5.3');

// Bumping will give you a new Semver!
$newSemver = $semver->bump(EnumBumpReleaseType::PATCH);

// $version = '2.5.4'
$version = $newSemver->getCurrentVersion();

More examples

Features

  • Bump to a release version
  • Bump to a pre-release version
  • Bump to a release version and start with a pre-release
  • Compare versions

See our examples

Classes and namespaces

Namespace Class
Seworqs\Semver Semver

License

Apache-2.0, see LICENSE

About SEworqs

Seworqs builds clean, reusable modules for PHP and Mendix developers.

Learn more at github.com/seworqs

Badges

Latest Version Total Downloads License PHP Version Made by SEworqs

About

A type-safe, chainable semantic versioning implementation for PHP with support for bumping versions, handling pre-releases, and comparing versions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages