From 437d6810b764db7afc572dd3a862b9c99cd46883 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 19 Jun 2025 13:01:26 +0800 Subject: [PATCH] Bump version, update docs, change owner dunglas to php --- README-zh.md | 2 +- README.md | 2 +- config/env.ini | 2 +- docs/en/guide/manual-build.md | 4 ++++ docs/zh/guide/manual-build.md | 4 ++++ src/SPC/ConsoleApplication.php | 2 +- src/SPC/builder/unix/UnixBuilderBase.php | 4 ++-- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README-zh.md b/README-zh.md index 0cbc4780..03fa7160 100755 --- a/README-zh.md +++ b/README-zh.md @@ -278,7 +278,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys 如果你知道 [embed SAPI](https://github.com/php/php-src/tree/master/sapi/embed),你应该知道如何使用它。对于有可能编译用到引入其他库的问题,你可以使用 `buildroot/bin/php-config` 来获取编译时的配置。 -另外,有关如何使用此功能的高级示例,请查看[如何使用它构建 FrankenPHP 的静态版本](https://github.com/dunglas/frankenphp/blob/main/docs/static.md)。 +另外,有关如何使用此功能的高级示例,请查看[如何使用它构建 FrankenPHP 的静态版本](https://github.com/php/frankenphp/blob/main/docs/static.md)。 ## 贡献 diff --git a/README.md b/README.md index 301d76fd..94c10d58 100755 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ If you know [embed SAPI](https://github.com/php/php-src/tree/master/sapi/embed), You may require the introduction of other libraries during compilation, you can use `buildroot/bin/php-config` to obtain the compile-time configuration. -For an advanced example of how to use this feature, take a look at [how to use it to build a static version of FrankenPHP](https://github.com/dunglas/frankenphp/blob/main/docs/static.md). +For an advanced example of how to use this feature, take a look at [how to use it to build a static version of FrankenPHP](https://github.com/php/frankenphp/blob/main/docs/static.md). ## Contribution diff --git a/config/env.ini b/config/env.ini index d80bc3e7..aa85751b 100644 --- a/config/env.ini +++ b/config/env.ini @@ -43,7 +43,7 @@ SPC_SKIP_PHP_VERSION_CHECK="no" ; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed") SPC_SKIP_DOCTOR_CHECK_ITEMS="" ; extra modules that xcaddy will include in the FrankenPHP build -SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/frankenphp/caddy --with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli" +SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/php/frankenphp/caddy --with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli" ; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them ; only useful for builds targeting not pure-static linking diff --git a/docs/en/guide/manual-build.md b/docs/en/guide/manual-build.md index 3c40d5eb..80c4e95b 100644 --- a/docs/en/guide/manual-build.md +++ b/docs/en/guide/manual-build.md @@ -167,6 +167,7 @@ If the build is successful, you will see the `buildroot/bin` directory in the cu - fpm: The build result is `buildroot/bin/php-fpm`. - micro: The build result is `buildroot/bin/micro.sfx`. If you need to further package it with PHP code, please refer to [Packaging micro binary](./manual-build#command-micro-combine). - embed: See [Using embed](./manual-build#embed-usage). +- frankenphp: The build result is `buildroot/bin/frankenphp`. If the build fails, you can use the `--debug` parameter to view detailed error information, or use the `--with-clean` to clear the old compilation results and recompile. @@ -290,6 +291,7 @@ You need to specify a compilation target, choose from the following parameters: - `--build-fpm`: Build a fpm sapi (php-fpm, used in conjunction with other traditional fpm architecture software such as nginx) - `--build-micro`: Build a micro sapi (used to build a standalone executable binary containing PHP code) - `--build-embed`: Build an embed sapi (used to embed into other C language programs) +- `--build-frankenphp`: Build a [FrankenPHP](https://github.com/php/frankenphp) executable - `--build-all`: build all above sapi ```bash @@ -509,6 +511,8 @@ When `bin/spc doctor` automatically repairs the Windows environment, tools such Here is an example of installing the tool: - Download and install UPX (Linux and Windows only): `bin/spc install-pkg upx` +- Download and install nasm (Windows only): `bin/spc install-pkg nasm` +- Download and install go-mod-frankenphp: `bin/spc install-pkg go-mod-frankenphp` ## Command - del-download diff --git a/docs/zh/guide/manual-build.md b/docs/zh/guide/manual-build.md index ca0395c8..230680ce 100644 --- a/docs/zh/guide/manual-build.md +++ b/docs/zh/guide/manual-build.md @@ -145,6 +145,7 @@ bin/spc craft --debug - fpm: 构建结果为 `buildroot/bin/php-fpm`。 - micro: 构建结果为 `buildroot/bin/micro.sfx`,如需进一步与 PHP 代码打包,请查看 [打包 micro 二进制](./manual-build#命令-micro-combine-打包-micro-二进制)。 - embed: 参见 [embed 使用](./manual-build#embed-使用)。 +- frankenphp: 构建结果为 `buildroot/bin/frankenphp`。 如果中途构建出错,你可以使用 `--debug` 参数查看详细的错误信息,或者使用 `--with-clean` 参数清除旧的编译结果,重新编译。 @@ -250,6 +251,7 @@ bin/spc doctor --auto-fix - `--build-fpm`: 构建一个 fpm sapi(php-fpm,用于和其他传统的 fpm 架构的软件如 nginx 配合使用) - `--build-micro`: 构建一个 micro sapi(用于构建一个包含 PHP 代码的独立可执行二进制) - `--build-embed`: 构建一个 embed sapi(用于嵌入到其他 C 语言程序中) +- `--build-frankenphp`: 构建一个 [frankenphp](https://github.com/php/frankenphp) 二进制 - `--build-all`: 构建以上所有 sapi ```bash @@ -457,6 +459,8 @@ bin/spc dev:sort-config ext 下面是安装工具的示例: - 下载安装 UPX(仅限 Linux 和 Windows): `bin/spc install-pkg upx` +- 下载安装 nasm(仅限 Windows): `bin/spc install-pkg nasm` +- 下载安装 go-mod-frankenphp: `bin/spc install-pkg go-mod-frankenphp` ## 命令 del-download - 删除已下载的资源 diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index c74c9bdc..b69dcf08 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -33,7 +33,7 @@ use Symfony\Component\Console\Application; */ final class ConsoleApplication extends Application { - public const VERSION = '2.6.0'; + public const VERSION = '2.6.1'; public function __construct() { diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index d88605ae..ef4a4f34 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -317,8 +317,8 @@ abstract class UnixBuilderBase extends BuilderBase $nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : ''; $xcaddyModules = getenv('SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES'); // make it possible to build from a different frankenphp directory! - if (!str_contains($xcaddyModules, '--with github.com/dunglas/frankenphp')) { - $xcaddyModules = '--with github.com/dunglas/frankenphp ' . $xcaddyModules; + if (!str_contains($xcaddyModules, '--with github.com/php/frankenphp')) { + $xcaddyModules = '--with github.com/php/frankenphp ' . $xcaddyModules; } if ($this->getLib('brotli') === null && str_contains($xcaddyModules, '--with github.com/dunglas/caddy-cbrotli')) { logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');