Commit Graph

1073 Commits

Author SHA1 Message Date
Marc
2895273476 perf: extend table on env startup instead of letting zend_hash_copy do it (#2272)
this can potentially save us a few internal calls to zend_hash_do_resize
while it loops over the source table (main_thread_env)

`8 -> 16 -> 32 -> 64 -> 128` becomes `8 -> target_size (rounded to power
of 2) 128`.
2026-03-12 22:23:39 +07:00
Marc
f595cea5cd Add IDE (GoLand/CLion) setup to CONTRIBUTING.md (#2269)
Signed-off-by: Marc <m@pyc.ac>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
2026-03-12 14:51:48 +07:00
github-actions[bot]
5734f466bc docs: update translations (#2263)
Translation updates for: hot-reload.md .

Co-authored-by: dunglas <57224+dunglas@users.noreply.github.com>
2026-03-11 10:19:04 +01:00
Kévin Dunglas
03c26eca02 refactor: hoist LoaderFunc to package-level var in phpheaders (#2053)
## Summary

Hoists the `otter.LoaderFunc` closure in `GetUnCommonHeader` to a
package-level `loader` var, so it is allocated once at init time instead
of being re-created on every call.

This is a minor cleanup — the previous code created a new `LoaderFunc`
closure each time `GetUnCommonHeader` was called. While otter's
cache-hit path is fast enough that this doesn't show a measurable
difference in end-to-end benchmarks, avoiding the repeated allocation is
strictly better.

## What changed

**Before** (closure created per call):
```go
func GetUnCommonHeader(ctx context.Context, key string) string {
    phpHeaderKey, err := headerKeyCache.Get(
        ctx,
        key,
        otter.LoaderFunc[string, string](func(_ context.Context, key string) (string, error) {
            return "HTTP_" + headerNameReplacer.Replace(strings.ToUpper(key)) + "\x00", nil
        }),
    )
    ...
}
```

**After** (closure allocated once):
```go
var loader = otter.LoaderFunc[string, string](func(_ context.Context, key string) (string, error) {
    return "HTTP_" + headerNameReplacer.Replace(strings.ToUpper(key)) + "\x00", nil
})

func GetUnCommonHeader(ctx context.Context, key string) string {
    phpHeaderKey, err := headerKeyCache.Get(ctx, key, loader)
    ...
}
```

## Benchmarks

Apple M1 Pro, 8 runs, `benchstat` comparison — no regressions, no extra
allocations:

| Benchmark | main | PR | vs base |
|---|---|---|---|
| HelloWorld | 41.81µ ± 2% | 42.75µ ± 5% | ~ (p=0.065) |
| ServerSuperGlobal | 73.36µ ± 2% | 74.20µ ± 3% | ~ (p=0.105) |
| UncommonHeaders | 69.03µ ± 3% | 68.71µ ± 1% | ~ (p=0.382) |

All results within noise. Zero change in allocations.
2026-03-10 19:07:32 +01:00
dependabot[bot]
2b27601994 ci: bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance).


Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

Updates `actions/download-artifact` from 7 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

Updates `actions/attest-build-provenance` from 3 to 4
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/attest-build-provenance
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 19:07:00 +01:00
Alexander Stecher
d5fa4cf474 fix: doc translation triggers (#2267)
Prevents PRs like #2259 by fixing the `git diff` so it ignores nested translation files.
2026-03-10 16:16:56 +01:00
Matthieu Gostiaux
53dfd2fcce add fr trad for hot-reload.md (#2105)
Hello, there doesn't seem to be an open MR for translating the new hot
reload feature. Here's what I can offer.

---------

Signed-off-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
2026-03-10 10:55:29 +01:00
Kévin Dunglas
2728df98c9 chore: prepare release 1.12.1 caddy/v1.12.1 v1.12.1 2026-03-10 10:49:02 +01:00
Kévin Dunglas
ff70f7e02b chore: bump deps 2026-03-10 10:33:03 +01:00
Kévin Dunglas
b49189ebf2 docs: improve hot reload, add missing features (#2261)
Updated wording for clarity and consistency in the hot reload
documentation.

---------

Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 16:58:11 +01:00
Kévin Dunglas
808757c52b docs: revise bug report template for improved instructions (#2181)
Updated bug report template for clarity and detail.

---------

Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: henderkes <m@pyc.ac>
2026-03-09 15:55:51 +01:00
Kévin Dunglas
16a70e4f10 ci: simplify translate workflow by using gh instead of peter-evans/create-pull-request (#2237) 2026-03-09 15:55:15 +01:00
Alexander Stecher
1f484321a0 tests: opcache_preload (#2257)
Adds a test to reproduce #2254 and verify `opcache_preload` works as
intended with the changes from
https://github.com/php/frankenphp/pull/2252.
2026-03-09 15:54:36 +01:00
github-actions[bot]
c1e30cd638 docs: update translations (#2216)
Translation updates for: extension-workers.md .

---------

Co-authored-by: alexandre-daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: Alexandre Daubois <alex.daubois@gmail.com>
2026-03-09 15:13:46 +01:00
Marc
d72a9ee9cb add vcpkg installed dir to gitignore (#2258) 2026-03-09 20:25:54 +07:00
github-actions[bot]
0774b141c9 docs: update translations (#2241)
Translation updates for: config.md .

---------

Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: dunglas <57224+dunglas@users.noreply.github.com>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
2026-03-09 14:18:13 +01:00
github-actions[bot]
9008b7bb14 docs: update translations (#2230)
Translation updates for: docker.md .

---------

Signed-off-by: Marc <m@pyc.ac>
Signed-off-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: alexandre-daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: Marc <m@pyc.ac>
Co-authored-by: Alexandre Daubois <alex.daubois@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 14:09:31 +01:00
github-actions[bot]
ebc7ef0868 docs: update translations (#2176)
Translation updates for: performance.md .

---------

Co-authored-by: AlliBalliBaba <45872305+AlliBalliBaba@users.noreply.github.com>
Co-authored-by: Alliballibaba <alliballibaba@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexandre-daubois <2144837+alexandre-daubois@users.noreply.github.com>
2026-03-09 14:08:14 +01:00
github-actions[bot]
48a9c08ee0 docs: update translations (#2206)
Translation updates for: worker.md .

---------

Signed-off-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: dunglas <57224+dunglas@users.noreply.github.com>
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alexandre Daubois <alex.daubois@gmail.com>
2026-03-09 14:07:59 +01:00
Marc
d1fcf0656c fix sigsev on bind permissions denied (#2250?) (#2251)
Previous behaviour was bugged from somewhere between 1.11.3 and 1.12.0:

```bash
❯❯ frankenphp git:(main) 10:46 ./frankenphp php-server
2026/03/08 03:46:36.541 WARN    admin   admin endpoint disabled
2026/03/08 03:46:36.541 WARN    http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "php", "http_port": 80}
2026/03/08 03:46:36.542 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0x182aaec16500"}
2026/03/08 03:46:36.582 INFO    frankenphp      FrankenPHP started 🐘   {"php_version": "8.6.0-dev", "num_threads": 32, "max_threads": 32}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xb436bf]

goroutine 1 [running]:
github.com/caddyserver/caddy/v2.(*Context).Value(0x182aaedbe078?, {0x1e2d340?, 0x25e0c90?})
        <autogenerated>:1 +0x1f
github.com/caddyserver/caddy/v2/modules/caddyhttp.(*extraFieldsSlogHandler).Handle(_, {_, _}, {{0xc2635a2724e776c5, 0x67b02fd, 0x3ca5000}, {0x22f7b13, 0x17}, 0x0, 0x1b7943e, ...})
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/modules/caddyhttp/logging.go:308 +0x4c
log/slog.(*Logger).logAttrs(0x182aaea2bc30, {0x260a170?, 0x182aae96ad20?}, 0x0, {0x22f7b13, 0x17}, {0x0, 0x0, 0x0})
        /home/m/static-php-cli/pkgroot/x86_64-linux/go-xcaddy/src/log/slog/logger.go:276 +0x277
log/slog.(*Logger).LogAttrs(...)
        /home/m/static-php-cli/pkgroot/x86_64-linux/go-xcaddy/src/log/slog/logger.go:194
github.com/dunglas/frankenphp/caddy.(*FrankenPHPApp).Stop(0x182aae844300)
        /home/m/frankenphp/caddy/app.go:182 +0x14b
github.com/caddyserver/caddy/v2.run.func2(...)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:460
github.com/caddyserver/caddy/v2.run(0x25d1e48?, 0x1)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:471 +0x977
github.com/caddyserver/caddy/v2.unsyncedDecodeAndRun({0x182aaee76400, 0x3ad, 0x400}, 0x1)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:364 +0x17a
github.com/caddyserver/caddy/v2.changeConfig({0x22c19cb, 0x4}, {0x22c7b94, 0x7}, {0x182aaee76000, 0x3ad, 0x400}, {0x0, 0x0}, 0x1)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:248 +0x959
github.com/caddyserver/caddy/v2.Load({0x182aaee76000, 0x3ad, 0x400}, 0x1)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:137 +0x225
github.com/caddyserver/caddy/v2.Run(0x1fdb7a0?)
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/caddy.go:109 +0x3b
github.com/dunglas/frankenphp/caddy.cmdPHPServer({0x0?})
        /home/m/frankenphp/caddy/php-server.go:320 +0x27b6
github.com/dunglas/frankenphp/caddy.init.4.func1.WrapCommandFuncForCobra.1(0x182aaee53808, {0x22c1a77?, 0x4?, 0x22c1a03?})
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/cmd/cobra.go:151 +0x2f
github.com/spf13/cobra.(*Command).execute(0x182aaee53808, {0x3cc96a0, 0x0, 0x0})
        /home/m/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1015 +0xb14
github.com/spf13/cobra.(*Command).ExecuteC(0x182aae7fbb08)
        /home/m/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
        /home/m/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/caddyserver/caddy/v2/cmd.Main()
        /home/m/go/pkg/mod/github.com/caddyserver/caddy/v2@v2.11.2/cmd/main.go:72 +0x65
main.main()
        /home/m/frankenphp/caddy/frankenphp/main.go:14 +0xf
```

This restores it to exit cleanly again:

```bash
        /home/m/frankenphp/caddy/frankenphp/main.go:14 +0xf
❯❯ frankenphp git:(main)  10:46 go build 
❯❯ frankenphp git:(main) 10:58 ./frankenphp php-server
2026/03/08 03:58:01.533 WARN    admin   admin endpoint disabled
2026/03/08 03:58:01.533 WARN    http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "php", "http_port": 80}
2026/03/08 03:58:01.533 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0x850ebf79280"}
2026/03/08 03:58:01.556 INFO    tls.cache.maintenance   stopped background certificate maintenance      {"cache": "0x850ebf79280"}
2026/03/08 03:58:01.556 INFO    http    servers shutting down with eternal grace period
Error: loading new config: http app module: start: listening on :80: listen tcp :80: bind: permission denied
```
2026-03-09 18:32:22 +07:00
Marc
5979b4dac7 fix php startup errors when ini files contain environment variables (#2252)
closes #2250

---------

Signed-off-by: Marc <m@pyc.ac>
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
2026-03-08 22:28:14 +07:00
Kévin Dunglas
a85faaeab8 docs: update README for Windows, other minor changes (#2249)
Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 19:47:51 +01:00
Kévin Dunglas
b570e0f8ba ci: fix Windows asset upload (#2245) 2026-03-07 19:44:08 +01:00
Kévin Dunglas
74e8195dc8 chore: prepare release 1.12.0 caddy/v1.12.0 v1.12.0 2026-03-06 16:48:45 +01:00
Kévin Dunglas
c2eb7a2538 chore: bump deps 2026-03-06 16:48:09 +01:00
Kévin Dunglas
87556c473e tests: fix race condition on macOS (#2242) 2026-03-06 16:47:49 +01:00
Mads Jon Nielsen
c099d665a2 feat(caddy): configurable max_idle_time for autoscaled threads (#2225)
Add configurable max_idle_time for autoscaled threads

The idle timeout for autoscaled threads is currently hardcoded to 5
seconds. With bursty traffic patterns, this causes threads to be
deactivated too quickly, leading to repeated cold-start overhead when
the next burst arrives.

This PR replaces the hardcoded constant with a configurable
max_idle_time directive, allowing users to tune how long idle
autoscaled threads stay alive before deactivation. The default remains 5
seconds, preserving existing behavior.

  Usage:

  Caddyfile:
````
  frankenphp {
      max_idle_time 30s
  }
````
  JSON config:
```
  {
      "frankenphp": {
          "max_idle_time": "30s"
      }
  }
````

  Changes:
  - New max_idle_time Caddyfile directive and JSON config option
  - New WithMaxIdleTime functional option
- Replaced hardcoded maxThreadIdleTime constant with configurable
maxIdleTime variable
  - Added tests for custom and default idle time behavior
  - Updated docs
2026-03-06 14:43:37 +01:00
Kévin Dunglas
5d44741041 ci: deploy docs when they change (#2234)
Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-05 18:10:56 +01:00
Kévin Dunglas
73c7b2efd5 ci: use Powershell 7+ for Windows workflow (#2236) 2026-03-05 18:07:13 +01:00
Kévin Dunglas
6268015b3a ci: fallback on static-php.dev mirror when php.net is down (#2233)
Unfortunately, GitHub Actions is often blocked by the php.net CDN. This
patch adds a fallback to use GitHub to try to determine the PHP version
to use. This is less ideal because PHP currently doesn't use GitHub
extensively, and distribution archives aren't available in the GitHub
releases, only on php.net.
2026-03-05 17:50:21 +01:00
Alexander Stecher
356d2e1745 refactor: cleaner cgi string handling
Introduces C-side interned string registry (frankenphp_strings) and a frankenphp_server_vars struct to bulk-register known $_SERVER variables with pre-sized hashtable capacity.
2026-03-04 17:20:24 +01:00
Kévin Dunglas
27ff6b49d8 docs: contributing on Windows (#2222)
Signed-off-by: Kévin Dunglas <kevin@dunglas.fr>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-03 20:40:05 +01:00
Kévin Dunglas
db41496a9f chore: make go_ub_write() length parameter type consistent with C 2026-03-03 16:46:26 +01:00
Philippe DELENTE
8151c3a7f3 feat: add Spanish translation (#2096) 2026-03-03 11:41:21 +01:00
Kévin Dunglas
cda58d224b fix(windows): ensure DLLs can always be located by PHP (#2227)
Prevent crashes when `php.ini` references PHP extensions using relative
paths, and FrankenPHP is started from a different working directory than
the one containing extensions, or with `caddy start` (instead of `caddy
run`).

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 18:27:30 +01:00
Kévin Dunglas
c2b8c8b15d feat: install script for Windows (#2228)
Update the shell script and add a PowerShell script to install the
Windows binary.

---------

Co-authored-by: Kévin Dunglas <kevin@dunglas.dev>
2026-03-02 15:31:54 +01:00
Alexander Stecher
dcfdb2f068 docs: hardened image with Caddy environment vars (#2229)
Adds `XDG_CONFIG_HOME` and `XDG_DATA_HOME` to the example hardened image
docs, otherwise Caddy will fail to use the nonexistent /home directory
instead of `/data/caddy` and `/config/caddy`.

Also removes an unnecessary `--chown=nonroot:nonroot`.
2026-03-02 08:46:59 +01:00
Alexander Stecher
8f4412cbbf perf: move sandboxed environment to the C side (#2058)
This PR uses `zend_array_dup` to simplify and optimize the environment sandboxing
logic. It also guarantees no environment leakage on FrankenPHP restarts.
2026-02-26 22:34:54 +01:00
Kévin Dunglas
25ed020036 feat: Windows support (#2119)
Closes #83 #880 #1286.

Working patch for Windows support.

Supports linking to the [official PHP release (TS
version)](https://www.php.net/downloads.php).
Includes some work from #1286 (thanks @TenHian!!)

This patch allows using Visual Studio to compile the cgo code. To do so,
it must be compiled with Go 1.26 (RC) with the following setup:

```powershell
winget install -e --id Microsoft.VisualStudio.2022.Community --override "--passive --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --includeRecommended"
winget install -e --id GoLang.Go

$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin'

cd c:\
gh repo clone microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install pthreads brotli

# build watcher
Invoke-WebRequest -Uri "https://github.com/e-dant/watcher/releases/download/0.14.3/x86_64-pc-windows-msvc.tar" -OutFile "$env:TEMP\watcher.tar"
tar -xf "$env:TEMP\watcher.tar" -C C:\
Rename-Item -Path "C:\x86_64-pc-windows-msvc" -NewName "watcher-x86_64-pc-windows-msvc"
Remove-Item "$env:TEMP\watcher.tar"

# download php
Invoke-WebRequest -Uri "https://downloads.php.net/~windows/releases/archives/php-8.5.1-Win32-vs17-x64.zip" -OutFile "$env:TEMP\php.zip"
Expand-Archive -Path "$env:TEMP\php.zip" -DestinationPath "C:\"
Remove-Item "$env:TEMP\php.zip"

# download php development package
Invoke-WebRequest -Uri "https://downloads.php.net/~windows/releases/archives/php-devel-pack-8.5.1-Win32-vs17-x64.zip" -OutFile "$env:TEMP\php-devel.zip"
Expand-Archive -Path "$env:TEMP\php-devel.zip" -DestinationPath "C:\"
Remove-Item "$env:TEMP\php-devel.zip"

$env:GOTOOLCHAIN = 'go1.26rc1'
$env:CC = 'clang'
$env:CXX = 'clang++'
$env:CGO_CFLAGS = "-I$env:C:\vcpkg\installed\x64-windows\include -IC:\watcher-x86_64-pc-windows-msvc -IC:\php-8.5.1-devel-vs17-x64\include -IC:\php-8.5.1-devel-vs17-x64\include\main -IC:\php-8.5.1-devel-vs17-x64\include\TSRM -IC:\php-8.5.1-devel-vs17-x64\include\Zend -IC:\php-8.5.1-devel-vs17-x64\include\ext"
$env:CGO_LDFLAGS = '-LC:\vcpkg\installed\x64-windows\lib -lbrotlienc -LC:\watcher-x86_64-pc-windows-msvc -llibwatcher-c -LC:\php-8.5.1-Win32-vs17-x64 -LC:\php-8.5.1-devel-vs17-x64\lib -lphp8ts -lphp8embed'

# clone frankenphp and build
git clone -b windows https://github.com/php/frankenphp.git
cd frankenphp\caddy\frankenphp
go build -ldflags '-extldflags="-fuse-ld=lld"' -tags nowatcher,nobadger,nomysql,nopgx

# Tests

$env:PATH += ";$env:VCPKG_ROOT\installed\x64-windows\bin;C:\watcher-x86_64-pc-windows-msvc";C:\php-8.5.1-Win32-vs17-x64"
"opcache.enable=0`r`nopcache.enable_cli=0" | Out-File -Encoding ascii php.ini
$env:PHPRC = Get-Location
go test -ldflags '-extldflags="-fuse-ld=lld"' -tags nowatcher,nobadger,nomysql,nopgx .
```

TODO:

- [x] Fix remaining skipped tests (scaling and watcher)
- [x] Test if the watcher mode works as expected
- [x] Automate the build with GitHub Actions

---------

Signed-off-by: Marc <m@pyc.ac>
Co-authored-by: Kévin Dunglas <kevin@dunglas.dev>
Co-authored-by: DubbleClick <m@pyc.ac>
2026-02-26 12:38:14 +01:00
Kévin Dunglas
0ae33863d0 chore: use ldflags to set Server header 2026-02-24 13:28:52 +01:00
Kévin Dunglas
bf30297104 chore: prepare release 1.11.3 caddy/v1.11.3 v1.11.3 2026-02-23 16:47:48 +01:00
Kévin Dunglas
f434f5ea37 chore: bump deps 2026-02-23 16:46:51 +01:00
Kévin Dunglas
681aae60a6 fix(worker): revert ini reset, keep session fixes (#2139)
Revert the INI snapshot/restore mechanism from #2139 which caused
issues with frameworks that lazily set ini values like session.save_path
(#2185). Replace the session handler snapshot/restore with a simpler
direct session state reset from #2193, which preserves mod_user_names
across requests without requiring session module reload.

Co-Authored-By: Xavier Leune <xavier.leune@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:02:20 +01:00
Kévin Dunglas
036aa2b5a1 fix: work around GCC 12 false positive when building watcher on i386
GCC 12 on Debian Bookworm i386 emits a spurious -Werror=use-after-free
in libstdc++ basic_string.h when compiling e-dant/watcher, causing
Docker builds to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:59:53 +01:00
tehmaestro
c99b6db5ae fix: nomercure build tag (#2212)
- Fixes nomercure tag build
- Conditionally addds the mercure route and mercure project import

Fixes https://github.com/php/frankenphp/issues/2209

I am by no means a go developer, feel free to use this or not :)

---------

Signed-off-by: tehmaestro <alexnegrila89@gmail.com>
Co-authored-by: Alexander Stecher <45872305+AlliBalliBaba@users.noreply.github.com>
2026-02-22 18:46:39 +01:00
YL
0dd485c0f2 docs: document the extensionworkers api (#2055) 2026-02-22 12:45:09 +01:00
Rob Landers
6d86ea84bc chore: run go fmt (#2211)
A few files were not formatted correctly.

Signed-off-by: Robert Landers <landers.robert@gmail.com>
Co-authored-by: Marc <m@pyc.ac>
2026-02-21 17:38:51 +01:00
Rob Landers
755db86116 metrics: only report workers ready when actually ready (#2210)
In #2205 it appears that workers could be reported in metrics as "ready"
before they are actually ready. This changes the reporting so that
workers are only reported ready once they have completed booting.

Signed-off-by: Robert Landers <landers.robert@gmail.com>
2026-02-21 17:34:35 +01:00
Marc
2bdf85866c Upgrade to Cady v2.11.1 (#2214)
fixes failing integration tests and closes
https://github.com/php/frankenphp/issues/2213
2026-02-21 23:29:47 +07:00
Marc
f38834826c Update static binary PHP version to 8.5 (#2168)
Signed-off-by: Marc <m@pyc.ac>
2026-02-20 21:16:21 +07:00