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

Breadcrumb

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

function VersionParser::normalizeDefaultBranch

Normalizes a default branch name (i.e. master on git) to 9999999-dev.

Parameters

string $name:

Return value

string

Deprecated

No need to use this anymore in theory, Composer 2 does not normalize any branch names to 9999999-dev anymore

File

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

Class

VersionParser
Version parser.

Namespace

Composer\Semver

Code

public function normalizeDefaultBranch($name) {
    if ($name === 'dev-master' || $name === 'dev-default' || $name === 'dev-trunk') {
        return '9999999-dev';
    }
    return (string) $name;
}

API Navigation

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