From 2469788185a6f227f554371ac59dcf51e59c6283 Mon Sep 17 00:00:00 2001 From: ramonskie Date: Thu, 22 Oct 2026 12:14:01 +0200 Subject: [PATCH] test: cover redis session store staging The sessions extension reads php.ini and php-fpm.conf through NewPHPConfigHelper, which resolves those paths from ctx.BuildDir. BUILD_DIR is not exported by the lifecycle, and PHP config is written under the dependency directory, so any app bound to a *-sessions service fails staging with "extension sessions compile failed: failed to load PHP config". Add a switchblade integration test that binds a user-provided service named redis-sessions, asserts staging succeeds, and checks the runtime php.ini directives the extension rewrites. The fixture reads the ini values without starting a session, so no Redis server is needed. Expected to fail until #1313 is merged. --- fixtures/with_sessions/index.php | 5 +++ src/php/integration/init_test.go | 1 + src/php/integration/sessions_test.go | 62 ++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 fixtures/with_sessions/index.php create mode 100644 src/php/integration/sessions_test.go diff --git a/fixtures/with_sessions/index.php b/fixtures/with_sessions/index.php new file mode 100644 index 000000000..3f5078f78 --- /dev/null +++ b/fixtures/with_sessions/index.php @@ -0,0 +1,5 @@ +