Download the PHP package kherge/semver without Composer

On this page you can find all versions of the php package kherge/semver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package semver

Build Status Packagist Packagist Pre Release

Version

A library for parsing and comparing semantic version numbers.

Usage

Please note that full qualified names are not used in the examples below. All references to interfaces, classes, and functions can be found in the namespace KHerGe\Version. Also note that the examples below do not demonstrate the complete abilities of the library. Please refer to the source files for more information.

Simple

Parsing

For very simple use cases, you only need the parse() function.

With this function, you can create a value object that represents an individual semantic version number. The value object is immutable, but convenience methods are available so that you can alter values and receive new value objects.

Comparing

Simple comparisons can also be performed directly on the value objects.

Validating

While, the parse() function throws a InvalidStringRepresentationException for invalid string representations of a semantic version number, you can still check yourself by using the is_valid() function.

Complex

Implementations

The library will work on any implementation of VersionInterface but provides a Version implementation that includes a lot of extra methods for convenience.

Parsing

If you need to use your own implementation of VersionInterface, the library provides a function to parse the components of a string representation so that you won't have to.

The result of parse_components() can be used to create a new instance that implements VersionInterface. This function performs its own validation, so checking with is_valid() will be redundant.

Comparing

The library contains a set of pre-made constraints, all of which implement ConstraintInterface. These constraints can be mixed and matched in order to perform far more complex comparison operations than by using the constraints on their own.

Requires

Install

To install, you will need to use Composer.

composer require kherge/semver

License

Released under both MIT and Apache 2.0.

See LICENSE.


All versions of semver with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kherge/semver contains the following files

Loading the files please wait ....