Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VersionParser.php

function VersionParser::expandStability

Expand shorthand stability string to long version.

Parameters

string $stability:

Return value

string

1 call to VersionParser::expandStability()
VersionParser::normalize in vendor/composer/semver/src/VersionParser.php
Normalizes a version string to be able to perform comparisons on it.

File

vendor/composer/semver/src/VersionParser.php, line 573

Class

VersionParser
Version parser.

Namespace

Composer\Semver

Code

private function expandStability($stability) {
    $stability = strtolower($stability);
    switch ($stability) {
        case 'a':
            return 'alpha';
        case 'b':
            return 'beta';
        case 'p':
        case 'pl':
            return 'patch';
        case 'rc':
            return 'RC';
        default:
            return $stability;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal