Skip to main content

Module version

Module version 

Source
Expand description

Port of Composer\Semver\VersionParser (docs/reference/resolver/ semver-VersionParser.php): normalize, normalizeBranch, parseStability, parseNumericAliasPrefix, with the same PCRE expressions (pcre2), so that every string is accepted or rejected exactly as Composer does.

Structs§

VersionError

Constants§

DEFAULT_BRANCH_ALIAS
MODIFIER_REGEX
STABILITIES_REGEX

Functions§

looks_too_strict
{^\d+(\.\d+)?$}: an “overly strict” constraint (1 or 1.2) that require warns about.
normalize
VersionParser::normalize($version, $fullVersion).
normalize_branch
VersionParser::normalizeBranch.
normalize_default_branch
VersionParser::normalizeDefaultBranch.
parse_name_version_pairs
VersionParser::parseNameVersionPairs: a/b:^1, a/b=^1, a/b ^1 (two arguments, unless the second looks like a package name).
parse_numeric_alias_prefix
VersionParser::parseNumericAliasPrefix.
parse_stability
VersionParser::parseStability.
preg_quote
preg_quote (without delimiter).
stability_rank
BasePackage::STABILITIES: numeric rank of a stability.