diff -u b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php --- b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php +++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -32,7 +32,7 @@ * * @see https://getcomposer.org/doc/04-schema.md#minimum-stability */ - protected const MINIMUM_STABILITY = 'stable'; + protected const MINIMUM_STABILITY = 'alpha'; /** * The order of stability strings from least stable to most stable. @@ -413,8 +413,8 @@ // If the current version is developing towards an x.y.0 release, there // might be tagged pre-releases. If there are, the latest one // determines the current stability of the branch. - $version_pattern = substr($version, 0, -3) . '*'; - $process = $this->executeCommand("git tag -l \"$version_pattern\" --sort=-refname | head -1"); + $version_pattern = str_replace('-dev', '-*', $version); + $process = $this->executeCommand("git tag -l \"$version_pattern\" --sort=-refname | head -1", $this->getDrupalRoot()); $this->assertCommandSuccessful(); $latest_tag = trim($process->getOutput()); if ($latest_tag !== '') {