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

Breadcrumb

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

function Composer::drupalVersionBranch

Return the branch name the current Drupal version is associated with.

Return value

string A branch name, e.g. 8.9.x or 9.0.x.

3 calls to Composer::drupalVersionBranch()
ComponentGenerator::getPackage in composer/Generator/ComponentGenerator.php
Reconcile component dependencies with core.
DrupalCoreRecommendedBuilder::initialPackageMetadata in composer/Generator/Builder/DrupalCoreRecommendedBuilder.php
Returns the initial package metadata that describes the metapackage.
DrupalPinnedDevDependenciesBuilder::initialPackageMetadata in composer/Generator/Builder/DrupalPinnedDevDependenciesBuilder.php
Returns the initial package metadata that describes the metapackage.

File

composer/Composer.php, line 112

Class

Composer
Provides static functions for composer script events.

Namespace

Drupal\Composer

Code

public static function drupalVersionBranch() : string {
    return preg_replace('#\\.[0-9]+-dev#', '.x-dev', \Drupal::VERSION);
}

API Navigation

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