public static function Composer::drupalVersionBranch in Drupal 10
Same name and namespace in other branches
- 8 composer/Composer.php \Drupal\Composer\Composer::drupalVersionBranch()
- 9 composer/Composer.php \Drupal\Composer\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()
- BuilderTest::builderTestData in core/
tests/ Drupal/ Tests/ Composer/ Generator/ BuilderTest.php - Provides test data for testBuilder.
- 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 105
Class
- Composer
- Provides static functions for composer script events. See also core/lib/Drupal/Composer/Composer.php, which contains similar scripts needed by projects that include drupal/core. Scripts that are only needed by drupal/drupal go here.
Namespace
Drupal\ComposerCode
public static function drupalVersionBranch() : string {
return preg_replace('#\\.[0-9]+-dev#', '.x-dev', \Drupal::VERSION);
}