MediaWiki  1.30.0
ComposerVersionNormalizer Class Reference

@licence GNU GPL v2+ More...

Public Member Functions

 normalizeLevelCount ( $version)
 Ensures the version has four levels. More...
 
 normalizeSuffix ( $version)
 Ensures there is a dash in between the version and the stability suffix. More...
 

Detailed Description

@licence GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Definition at line 7 of file ComposerVersionNormalizer.php.

Member Function Documentation

◆ normalizeLevelCount()

ComposerVersionNormalizer::normalizeLevelCount (   $version)

Ensures the version has four levels.

Version suffixes are supported, as long as they start with a dash.

Examples:

  • 1.19 => 1.19.0.0
  • 1.19.2.3 => 1.19.2.3
  • 1.19-alpha => 1.19.0.0-alpha
  • 1337 => 1337.0.0.0
Parameters
string$version
Returns
string
Exceptions
InvalidArgumentException

Definition at line 46 of file ComposerVersionNormalizer.php.

◆ normalizeSuffix()

ComposerVersionNormalizer::normalizeSuffix (   $version)

Ensures there is a dash in between the version and the stability suffix.

Examples:

  • 1.23RC => 1.23-RC
  • 1.23alpha => 1.23-alpha
  • 1.23alpha3 => 1.23-alpha3
  • 1.23-beta => 1.23-beta
Parameters
string$version
Returns
string
Exceptions
InvalidArgumentException

Definition at line 23 of file ComposerVersionNormalizer.php.


The documentation for this class was generated from the following file: