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\ComposerCode
public static function drupalVersionBranch() : string {
return preg_replace('#\\.[0-9]+-dev#', '.x-dev', \Drupal::VERSION);
}