function Composer::drupalMajorVersionBranch
Same name and namespace in other branches
- 11.x composer/Composer.php \Drupal\Composer\Composer::drupalMajorVersionBranch()
Return the major version branch alias for the current Drupal version.
Return value
string A branch alias, e.g. 11.x-dev or 12.x-dev.
2 calls to Composer::drupalMajorVersionBranch()
- DrupalCoreRecommendedBuilder::initialPackageMetadata in composer/
Generator/ Builder/ DrupalCoreRecommendedBuilder.php - Returns the initial package metadata that describes the metapackage.
- DrupalDevDependenciesBuilder::initialPackageMetadata in composer/
Generator/ Builder/ DrupalDevDependenciesBuilder.php - Returns the initial package metadata that describes the metapackage.
File
-
composer/
Composer.php, line 122
Class
- Composer
- Provides static functions for composer script events.
Namespace
Drupal\ComposerCode
public static function drupalMajorVersionBranch() : string {
return explode('.', \Drupal::VERSION)[0] . '.x-dev';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.