2017 © Pedro Peláez
 

library version

A library for creating, editing, and comparing semantic versioning numbers.

image

version/version

A library for creating, editing, and comparing semantic versioning numbers.

  • Sunday, June 7, 2015
  • by amouhzi
  • Repository
  • 3 Watchers
  • 5 Stars
  • 102,151 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 7 % Grown

The README.md

Versions and Constraints for PHP

This library parse versions, E.x.: 1.0.0 1.0.2-stable 1.0.20-alpha2. It can parse constraints (like Composer versions), E.x.: >=1.0 >=1.0,<2.0 >=1.0,<1.1 | >=1.2, 1.0.*, ~1.2., (*1)

The goal of that is to let you check if a version matches a constraint, or to check if a constraint is a subset of another constraint., (*2)

All that is done to let us select which version is compatible with a user constraints., (*3)

It works with the same rules of Composer versioning., (*4)

Sorting

In order to use standard PHP sorting there is a helper class 'Compare' to use it with a sort you will need to do this;, (*5)

use Version\Version;
use Version\Compare;

$vers = array();
$vers[] = Version::parse('1.1.1d1');
$vers[] = '1.1.1';

$obj = new Compare();
usort( $vers, array( $obj, 'compare' ) );

The above should allow any normal PHP sort to be instigated with very little effort., (*6)

Note: You should see that it will handle a string or a Version object as the variable to sort automatically., (*7)

The Versions

07/06 2015

2.x-dev

2.9999999.9999999.9999999-dev http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

07/06 2015

2.2

2.2.0.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

07/06 2015

dev-master

9999999-dev http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

06/06 2015

2.1.1

2.1.1.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

05/06 2015

2.1.0

2.1.0.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

20/10 2014

2.0.1

2.0.1.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

20/10 2014

2.0.0

2.0.0.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic

18/10 2014

1.0.0

1.0.0.0 http://github.com/php-mod/version

A library for creating, editing, and comparing semantic versioning numbers.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

version semantic