File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,10 @@ public function emitPatchPoint(string $point_name): void
513513 public function checkBeforeBuildPHP (int $ rule ): void
514514 {
515515 if (($ rule & BUILD_TARGET_FRANKENPHP ) === BUILD_TARGET_FRANKENPHP ) {
516- // frankenphp only support linux and macOS
516+ if (!$ this ->getOption ('enable-zts ' )) {
517+ throw new WrongUsageException ('FrankenPHP SAPI requires ZTS enabled PHP, build with `--enable-zts`! ' );
518+ }
519+ // frankenphp doesn't support windows, BSD is currently not supported by static-php-cli
517520 if (!in_array (PHP_OS_FAMILY , ['Linux ' , 'Darwin ' ])) {
518521 throw new WrongUsageException ('FrankenPHP SAPI is only available on Linux and macOS! ' );
519522 }
@@ -523,9 +526,9 @@ public function checkBeforeBuildPHP(int $rule): void
523526 global $ argv ;
524527 throw new WrongUsageException ("FrankenPHP SAPI requires go-mod-frankenphp package, please install it first: {$ argv [0 ]} install-pkg go-mod-frankenphp " );
525528 }
526- // frankenphp needs libxml2 libs
529+ // frankenphp needs libxml2 lib on macos, see: https://github.com/php/frankenphp/blob/main/frankenphp.go#L17
527530 if (PHP_OS_FAMILY === 'Darwin ' && !$ this ->getLib ('libxml2 ' )) {
528- throw new WrongUsageException ('FrankenPHP SAPI for macOS requires libxml2 library, please include `xml` extension in your build. ' );
531+ throw new WrongUsageException ('FrankenPHP SAPI for macOS requires libxml2 library, please include the `xml` extension in your build. ' );
529532 }
530533 }
531534 }
Original file line number Diff line number Diff line change @@ -304,13 +304,6 @@ private function parseRules(array $shared_extensions = []): int
304304 $ rule |= BUILD_TARGET_EMBED ;
305305 f_putenv ('SPC_CMD_VAR_PHP_EMBED_TYPE= ' . ($ embed === 'static ' ? 'static ' : 'shared ' ));
306306 }
307- if ($ this ->getOption ('build-frankenphp ' )) {
308- $ rule |= BUILD_TARGET_FRANKENPHP ;
309- if (!$ this ->getOption ('enable-zts ' )) {
310- logger ()->warning ('FrankenPHP requires ZTS to work with multiple threads, the --enable-zts option will be enabled automatically! ' );
311- $ this ->input ->setOption ('enable-zts ' , true );
312- }
313- }
314307 $ rule |= ($ this ->getOption ('build-frankenphp ' ) ? (BUILD_TARGET_FRANKENPHP | BUILD_TARGET_EMBED ) : BUILD_TARGET_NONE );
315308 $ rule |= ($ this ->getOption ('build-all ' ) ? BUILD_TARGET_ALL : BUILD_TARGET_NONE );
316309 return $ rule ;
You can’t perform that action at this time.
0 commit comments