File tree Expand file tree Collapse file tree 6 files changed +20
-20
lines changed Expand file tree Collapse file tree 6 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 43
43
"upx-*-win64/upx.exe" : " {pkg_root_path}/bin/upx.exe"
44
44
}
45
45
},
46
- "go-mod-frankenphp -x86_64-linux" : {
46
+ "go-xcaddy -x86_64-linux" : {
47
47
"type" : " custom"
48
48
},
49
- "go-mod-frankenphp -aarch64-linux" : {
49
+ "go-xcaddy -aarch64-linux" : {
50
50
"type" : " custom"
51
51
},
52
- "go-mod-frankenphp -x86_64-macos" : {
52
+ "go-xcaddy -x86_64-macos" : {
53
53
"type" : " custom"
54
54
},
55
- "go-mod-frankenphp -aarch64-macos" : {
55
+ "go-xcaddy -aarch64-macos" : {
56
56
"type" : " custom"
57
57
}
58
58
}
Original file line number Diff line number Diff line change @@ -520,11 +520,11 @@ public function checkBeforeBuildPHP(int $rule): void
520
520
if (!in_array (PHP_OS_FAMILY , ['Linux ' , 'Darwin ' ])) {
521
521
throw new WrongUsageException ('FrankenPHP SAPI is only available on Linux and macOS! ' );
522
522
}
523
- // frankenphp needs package go-mod-frankenphp installed
524
- $ pkg_dir = PKG_ROOT_PATH . '/go-mod-frankenphp - ' . arch2gnu (php_uname ('m ' )) . '- ' . osfamily2shortname ();
523
+ // frankenphp needs package go-xcaddy installed
524
+ $ pkg_dir = PKG_ROOT_PATH . '/go-xcaddy - ' . arch2gnu (php_uname ('m ' )) . '- ' . osfamily2shortname ();
525
525
if (!file_exists ("{$ pkg_dir }/bin/go " ) || !file_exists ("{$ pkg_dir }/bin/xcaddy " )) {
526
526
global $ argv ;
527
- throw new WrongUsageException ("FrankenPHP SAPI requires go-mod-frankenphp package, please install it first: {$ argv [0 ]} install-pkg go-mod-frankenphp " );
527
+ throw new WrongUsageException ("FrankenPHP SAPI requires the go-xcaddy package, please install it first: {$ argv [0 ]} install-pkg go-xcaddy " );
528
528
}
529
529
// frankenphp needs libxml2 lib on macos, see: https://github.com/php/frankenphp/blob/main/frankenphp.go#L17
530
530
if (PHP_OS_FAMILY === 'Darwin ' && !$ this ->getLib ('libxml2 ' )) {
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ protected function buildFrankenphp(): void
311
311
$ arch = arch2gnu (php_uname ('m ' ));
312
312
313
313
// define executables for go and xcaddy
314
- $ xcaddy_exec = PKG_ROOT_PATH . "/go-mod-frankenphp - {$ arch }- {$ os }/bin/xcaddy " ;
314
+ $ xcaddy_exec = PKG_ROOT_PATH . "/go-xcaddy - {$ arch }- {$ os }/bin/xcaddy " ;
315
315
316
316
$ nobrotli = $ this ->getLib ('brotli ' ) === null ? ',nobrotli ' : '' ;
317
317
$ nowatcher = $ this ->getLib ('watcher ' ) === null ? ',nowatcher ' : '' ;
@@ -342,9 +342,9 @@ protected function buildFrankenphp(): void
342
342
$ config = (new SPCConfigUtil ($ this ))->config ($ this ->ext_list , $ this ->lib_list , with_dependencies: true );
343
343
344
344
$ env = [
345
- 'PATH ' => PKG_ROOT_PATH . "/go-mod-frankenphp - {$ arch }- {$ os }/bin: " . getenv ('PATH ' ),
346
- 'GOROOT ' => PKG_ROOT_PATH . "/go-mod-frankenphp - {$ arch }- {$ os }" ,
347
- 'GOBIN ' => PKG_ROOT_PATH . "/go-mod-frankenphp - {$ arch }- {$ os }/bin " ,
345
+ 'PATH ' => PKG_ROOT_PATH . "/go-xcaddy - {$ arch }- {$ os }/bin: " . getenv ('PATH ' ),
346
+ 'GOROOT ' => PKG_ROOT_PATH . "/go-xcaddy - {$ arch }- {$ os }" ,
347
+ 'GOBIN ' => PKG_ROOT_PATH . "/go-xcaddy - {$ arch }- {$ os }/bin " ,
348
348
'GOPATH ' => PKG_ROOT_PATH . '/go ' ,
349
349
'CGO_ENABLED ' => '1 ' ,
350
350
'CGO_CFLAGS ' => $ config ['cflags ' ],
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ public function handle(): int
68
68
}
69
69
// install go and xcaddy for frankenphp
70
70
if (in_array ('frankenphp ' , $ craft ['sapi ' ])) {
71
- $ retcode = $ this ->runCommand ('install-pkg ' , 'go-mod-frankenphp ' );
71
+ $ retcode = $ this ->runCommand ('install-pkg ' , 'go-xcaddy ' );
72
72
if ($ retcode !== 0 ) {
73
- $ this ->output ->writeln ('<error>craft go-mod-frankenphp failed</error> ' );
74
- $ this ->log ("craft go-mod-frankenphp failed with code: {$ retcode }" , true );
73
+ $ this ->output ->writeln ('<error>craft go-xcaddy failed</error> ' );
74
+ $ this ->log ("craft go-xcaddy failed with code: {$ retcode }" , true );
75
75
return static ::FAILURE ;
76
76
}
77
77
}
Original file line number Diff line number Diff line change 9
9
use SPC \store \LockFile ;
10
10
use SPC \util \GlobalEnvManager ;
11
11
12
- class GoModFrankenphp extends CustomPackage
12
+ class GoXcaddy extends CustomPackage
13
13
{
14
14
public function getSupportName (): array
15
15
{
16
16
return [
17
- 'go-mod-frankenphp -x86_64-linux ' ,
18
- 'go-mod-frankenphp -x86_64-macos ' ,
19
- 'go-mod-frankenphp -aarch64-linux ' ,
20
- 'go-mod-frankenphp -aarch64-macos ' ,
17
+ 'go-xcaddy -x86_64-linux ' ,
18
+ 'go-xcaddy -x86_64-macos ' ,
19
+ 'go-xcaddy -aarch64-linux ' ,
20
+ 'go-xcaddy -aarch64-macos ' ,
21
21
];
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ function quote2(string $param): string
212
212
break ;
213
213
case 'build_embed_cmd ' :
214
214
if ($ frankenphp ) {
215
- passthru ("{$ prefix }install-pkg go-mod-frankenphp --debug " , $ retcode );
215
+ passthru ("{$ prefix }install-pkg go-xcaddy --debug " , $ retcode );
216
216
if ($ retcode !== 0 ) {
217
217
break ;
218
218
}
You can’t perform that action at this time.
0 commit comments