Clanbite Since 1.6.0
class Version_ConstraintThe small constraint language used in plugin headers (Requires Clanbite: ^1.5.0):
^X.Y.Z: this version or any later one in the same major (^0.Y.Zstays in the same minor,^0.0.Zis exact). A bareX.Y.Zmeans the same as^X.Y.Z: Clanbite promises backward compatibility within a major version.- Comparators
>=,>,<=,<,=, separated by spaces, all of which must hold:>=1.2 <3. *accepts any version.
Upper bounds ignore a pre-release suffix on the checked version, so 2.0.0-beta.1 is **not** inside <2.0.0. The same logic lives in the update server (Kernowdev\ClanbiteExtensionServer\Services\Version_Constraint): keep them identical.
class final
- Full name
Kernowdev\Clanbite\Updates\Version_Constraint
Methods
is_valid()Whether an expression is syntactically valid.parse_addons()Parse the Requires Clanbite Add-ons header: clanbite-points ^1.3, clanbite-forums >=1.2 <3.parse()Parse an expression into comparators.satisfies()Whether a version satisfies a constraint.
Defined in inc/updates/class-version-constraint.php
Changelog
| Version | Description |
|---|---|
| 1.6.0 | Introduced. |