From 7a66595f149f8d26d53e661717fbc25fcfb77738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 15:19:05 +0100 Subject: [PATCH 1/3] chore: remove useless cgo imports --- internal/phpheaders/phpheaders.go | 1 - internal/state/state.go | 1 - scaling.go | 3 --- worker.go | 2 -- 4 files changed, 7 deletions(-) diff --git a/internal/phpheaders/phpheaders.go b/internal/phpheaders/phpheaders.go index 71f23e7d9..19f1908d2 100644 --- a/internal/phpheaders/phpheaders.go +++ b/internal/phpheaders/phpheaders.go @@ -1,6 +1,5 @@ package phpheaders -import "C" import ( "context" "strings" diff --git a/internal/state/state.go b/internal/state/state.go index b15c008bc..35fa9633d 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -1,6 +1,5 @@ package state -import "C" import ( "slices" "sync" diff --git a/scaling.go b/scaling.go index 37e081abb..51acd1cd3 100644 --- a/scaling.go +++ b/scaling.go @@ -1,8 +1,5 @@ package frankenphp -//#include "frankenphp.h" -//#include -import "C" import ( "errors" "log/slog" diff --git a/worker.go b/worker.go index e2c545363..c4e45b56e 100644 --- a/worker.go +++ b/worker.go @@ -1,7 +1,5 @@ package frankenphp -// #include "frankenphp.h" -import "C" import ( "fmt" "os" From bc1fa6fef8fb33b2bfb55ab2b0f00a264d71351b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 15:50:28 +0100 Subject: [PATCH 2/3] remove unistd.h --- frankenphp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/frankenphp.c b/frankenphp.c index d048e576b..fc9a87a51 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -19,7 +19,6 @@ #include #include #include -#include #if defined(__linux__) #include #elif defined(__FreeBSD__) || defined(__OpenBSD__) From 1e10aca06950bd1ebe8a63f000a56b9e8f2e4e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 8 Jan 2026 16:12:39 +0100 Subject: [PATCH 3/3] remove PHPAPI macro as we don't export these functions --- frankenphp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frankenphp.c b/frankenphp.c index fc9a87a51..69969501b 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -204,7 +204,7 @@ bool frankenphp_shutdown_dummy_request(void) { return true; } -PHPAPI void get_full_env(zval *track_vars_array) { +void get_full_env(zval *track_vars_array) { go_getfullenv(thread_index, track_vars_array); } @@ -1265,7 +1265,7 @@ static zend_module_entry *modules = NULL; static int modules_len = 0; static int (*original_php_register_internal_extensions_func)(void) = NULL; -PHPAPI int register_internal_extensions(void) { +int register_internal_extensions(void) { if (original_php_register_internal_extensions_func != NULL && original_php_register_internal_extensions_func() != SUCCESS) { return FAILURE;