Skip to content

Commit c3f5cf7

Browse files
committed
Override default recommended versions for bundled extensions
1 parent da8a8e5 commit c3f5cf7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ComposerIntegration/ComposerIntegrationHandler.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ public function runInstall(
4242
$recommendedRequireVersion = $versionSelector->findRecommendedRequireVersion($package->composerPackage());
4343
}
4444

45+
if ($package->isBundledPhpExtension()) {
46+
$stability = $package->composerPackage()->getStability();
47+
$stabilitySuffix = '';
48+
if ($stability !== 'stable') {
49+
$stabilitySuffix = '@'.$stability;
50+
}
51+
$recommendedRequireVersion = '*' . $stabilitySuffix;
52+
}
53+
4554
// Write the new requirement to pie.json; because we later essentially just do a `composer install` using that file
4655
$pieComposerJson = Platform::getPieJsonFilename($targetPlatform);
4756
$pieJsonEditor = PieJsonEditor::fromTargetPlatform($targetPlatform);

0 commit comments

Comments
 (0)