PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / trunk
Matomo Analytics – Powerful, Privacy-First Insights for WordPress vtrunk
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / app / vendor / composer / semver / README.md
matomo / app / vendor / composer / semver Last commit date
src 7 months ago LICENSE 6 years ago README.md 1 year ago
README.md
100 lines
1 composer/semver
2 ===============
3
4 Semver (Semantic Versioning) library that offers utilities, version constraint parsing and validation.
5
6 Originally written as part of [](https://github.com/composer/composercomposer/composer](https://github.com/composer/composer](https://github.com/composer/composer),
7 now extracted and made available as a stand-alone library.
8
9 [](https://github.com/composer/semver/actions/workflows/continuous-integration.yml![Continuous Integration](https://github.com/composer/semver/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/composer/semver/actions/workflows/continuous-integration.yml](https://github.com/composer/semver/actions/workflows/continuous-integration.yml)
10 [](https://github.com/composer/semver/actions/workflows/lint.yml![PHP Lint](https://github.com/composer/semver/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/composer/semver/actions/workflows/lint.yml](https://github.com/composer/semver/actions/workflows/lint.yml)
11 [](https://github.com/composer/semver/actions/workflows/phpstan.yml![PHPStan](https://github.com/composer/semver/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/composer/semver/actions/workflows/phpstan.yml](https://github.com/composer/semver/actions/workflows/phpstan.yml)
12
13 Installation
14 ------------
15
16 Install the latest version with:
17
18 ```bash
19 composer require composer/semver
20 ```
21
22
23 Requirements
24 ------------
25
26 * PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
27
28
29 Version Comparison
30 ------------------
31
32 For details on how versions are compared, refer to the [](https://getcomposer.org/doc/articles/versions.mdVersions](https://getcomposer.org/doc/articles/versions.md](https://getcomposer.org/doc/articles/versions.md)
33 article in the documentation section of the [](https://getcomposer.orggetcomposer.org](https://getcomposer.org](https://getcomposer.org) website.
34
35
36 Basic usage
37 -----------
38
39 ### Comparator
40
41 The [](https://github.com/composer/semver/blob/main/src/Comparator.php`Composer\Semver\Comparator`](https://github.com/composer/semver/blob/main/src/Comparator.php](https://github.com/composer/semver/blob/main/src/Comparator.php) class provides the following methods for comparing versions:
42
43 * greaterThan($v1, $v2)
44 * greaterThanOrEqualTo($v1, $v2)
45 * lessThan($v1, $v2)
46 * lessThanOrEqualTo($v1, $v2)
47 * equalTo($v1, $v2)
48 * notEqualTo($v1, $v2)
49
50 Each function takes two version strings as arguments and returns a boolean. For example:
51
52 ```php
53 use Composer\Semver\Comparator;
54
55 Comparator::greaterThan('1.25.0', '1.24.0'); // 1.25.0 > 1.24.0
56 ```
57
58 ### Semver
59
60 The [`Composer\Semver\Semver`](https://github.com/composer/semver/blob/main/src/Semver.php) class provides the following methods:
61
62 * satisfies($version, $constraints)
63 * satisfiedBy(array $versions, $constraint)
64 * sort($versions)
65 * rsort($versions)
66
67 ### Intervals
68
69 The [`Composer\Semver\Intervals`](https://github.com/composer/semver/blob/main/src/Intervals.php) static class provides
70 a few utilities to work with complex constraints or read version intervals from a constraint:
71
72 ```php
73 use Composer\Semver\Intervals;
74
75 // Checks whether $candidate is a subset of $constraint
76 Intervals::isSubsetOf(ConstraintInterface $candidate, ConstraintInterface $constraint);
77
78 // Checks whether $a and $b have any intersection, equivalent to $a->matches($b)
79 Intervals::haveIntersections(ConstraintInterface $a, ConstraintInterface $b);
80
81 // Optimizes a complex multi constraint by merging all intervals down to the smallest
82 // possible multi constraint. The drawbacks are this is not very fast, and the resulting
83 // multi constraint will have no human readable prettyConstraint configured on it
84 Intervals::compactConstraint(ConstraintInterface $constraint);
85
86 // Creates an array of numeric intervals and branch constraints representing a given constraint
87 Intervals::get(ConstraintInterface $constraint);
88
89 // Clears the memoization cache when you are done processing constraints
90 Intervals::clear()
91 ```
92
93 See the class docblocks for more details.
94
95
96 License
97 -------
98
99 composer/semver is licensed under the MIT License, see the LICENSE file for details.
100