Nordine
c12841bf89
Force reload in frankenphp service configuration ( #2281 )
...
@henderkes This resolve the `symlink` issue for the symlink deployment
strategy.
_alpine already have the force flag._
---------
Signed-off-by: Nordine <5256921+kitro@users.noreply.github.com >
2026-03-23 19:30:39 +07:00
Marc
0818f8f8c1
chore: bump go mod ( #2297 )
...
closes https://github.com/php/frankenphp/pull/2296
closes https://github.com/php/frankenphp/issues/2295
2026-03-23 19:30:03 +07:00
Nicolas Grekas
0a226ad129
ci: fix Windows tests silently passing on failure ( #2294 )
...
PowerShell doesn't stop on non-zero exit codes by default. `go test`
failures were ignored, and the step reported success because the
subsequent caddy tests passed.
Caught on this job, which fails but is green:
https://github.com/php/frankenphp/actions/runs/23424633971/job/68136742625?pr=2287
2026-03-23 14:49:18 +07:00
Alexandre Daubois
33fcc4d5c0
chore: bump GA deps ( #2288 )
...
Supersedes #2286
2026-03-17 10:06:55 +01:00
github-actions[bot]
a69693c461
docs: update translations ( #2285 )
...
Translation updates for: config.md .
---------
Signed-off-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com >
Co-authored-by: henderkes <7896469+henderkes@users.noreply.github.com >
Co-authored-by: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com >
2026-03-17 10:06:32 +01:00
Alexander Stecher
9cfa7b3f65
fix: opcache_preload in PHP 8.2 ( #2284 )
...
Fixes the Docker image tests currently failing in CI.
2026-03-17 11:14:45 +07:00
Alexandre Daubois
097563d262
feat(docs): add autocompletion docs ( #2010 )
...
Co-authored-by: henderkes <m@pyc.ac >
2026-03-16 09:38:14 +07:00
Alexandre Daubois
bd8f0c2be6
docs: adjust the translation for "harden" in French
2026-03-12 20:27:44 +01:00
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