Skip to content

Commit 1ba92cc

Browse files
committed
fix patch version stripping (.\d -> .\d+)
1 parent 75db184 commit 1ba92cc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,15 @@ protected function buildFrankenphp(): void
338338
), true);
339339
$frankenPhpVersion = $releaseInfo['tag_name'];
340340
$libphpVersion = $this->getPHPVersion();
341-
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
342-
$libphpVersion = preg_replace('/\.\d$/', '', $libphpVersion);
343-
}
344-
$debugFlags = $this->getOption('no-strip') ? '-w -s ' : '';
345341
$dynamic_exports = '';
346-
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'static') {
342+
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
343+
$libphpVersion = preg_replace('/\.\d+$/', '', $libphpVersion);
344+
} else {
347345
if ($dynamicSymbolsArgument = $this->getDynamicExportSymbolsArgument()) {
348346
$dynamic_exports = ' ' . $dynamicSymbolsArgument;
349347
}
350348
}
349+
$debugFlags = $this->getOption('no-strip') ? '-w -s ' : '';
351350
$extLdFlags = "-extldflags '-pie{$dynamic_exports}'";
352351
$muslTags = '';
353352
$staticFlags = '';

0 commit comments

Comments
 (0)