Skip to content

Commit 2a9a9a8

Browse files
committed
Merge branch 'main' into fix/opcache-safe-reset
# Conflicts: # caddy/caddy_test.go
2 parents 973d722 + f4667e3 commit 2a9a9a8

52 files changed

Lines changed: 1523 additions & 352 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/static.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- main
1111
paths:
1212
- "docker-bake.hcl"
13-
- ".github/workflows/docker.yaml"
13+
- ".github/workflows/static.yaml"
1414
- "**cgo.go"
1515
- "**Dockerfile"
1616
- "**.c"
@@ -37,6 +37,7 @@ permissions:
3737

3838
env:
3939
IMAGE_NAME: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version) || startsWith(github.ref, 'refs/tags/')) && 'dunglas/frankenphp' || 'dunglas/frankenphp-dev' }}
40+
SPC_OPT_BUILD_ARGS: --debug
4041
GOTOOLCHAIN: local
4142

4243
jobs:

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
matrix:
102102
php-versions: ["8.3", "8.4", "8.5"]
103103
steps:
104-
- uses: actions/checkout@v5
104+
- uses: actions/checkout@v6
105105
with:
106106
persist-credentials: false
107107
- uses: actions/setup-go@v6

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ Go to `https://localhost`, and enjoy!
128128
- [Worker mode](https://frankenphp.dev/docs/worker/)
129129
- [Early Hints support (103 HTTP status code)](https://frankenphp.dev/docs/early-hints/)
130130
- [Real-time](https://frankenphp.dev/docs/mercure/)
131+
- [Logging](https://frankenphp.dev/docs/logging/)
132+
- [Hot reloading](https://frankenphp.dev/docs/hot-reload/)
131133
- [Efficiently Serving Large Static Files](https://frankenphp.dev/docs/x-sendfile/)
132134
- [Configuration](https://frankenphp.dev/docs/config/)
133135
- [Writing PHP Extensions in Go](https://frankenphp.dev/docs/extensions/)
@@ -138,6 +140,7 @@ Go to `https://localhost`, and enjoy!
138140
- [Create static binaries](https://frankenphp.dev/docs/static/)
139141
- [Compile from sources](https://frankenphp.dev/docs/compile/)
140142
- [Monitoring FrankenPHP](https://frankenphp.dev/docs/metrics/)
143+
- [WordPress integration](https://frankenphp.dev/docs/wordpress/)
141144
- [Laravel integration](https://frankenphp.dev/docs/laravel/)
142145
- [Known issues](https://frankenphp.dev/docs/known-issues/)
143146
- [Demo app (Symfony) and benchmarks](https://github.com/dunglas/frankenphp-demo)

build-static.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,11 @@ fi
178178

179179
# Embed PHP app, if any
180180
if [ -n "${EMBED}" ] && [ -d "${EMBED}" ]; then
181-
SPC_OPT_BUILD_ARGS="${SPC_OPT_BUILD_ARGS} --with-frankenphp-app=${EMBED}"
181+
if [[ "${EMBED}" != /* ]]; then
182+
EMBED="${CURRENT_DIR}/${EMBED}"
183+
fi
184+
# shellcheck disable=SC2089
185+
SPC_OPT_BUILD_ARGS="${SPC_OPT_BUILD_ARGS} --with-frankenphp-app='${EMBED}'"
182186
fi
183187

184188
SPC_OPT_INSTALL_ARGS="go-xcaddy"
@@ -204,7 +208,7 @@ done
204208
# shellcheck disable=SC2086
205209
${spcCommand} download --with-php="${PHP_VERSION}" --for-extensions="${PHP_EXTENSIONS}" --for-libs="${PHP_EXTENSION_LIBS}" ${SPC_OPT_DOWNLOAD_ARGS}
206210
export FRANKENPHP_SOURCE_PATH="${CURRENT_DIR}"
207-
# shellcheck disable=SC2086
211+
# shellcheck disable=SC2086,SC2090
208212
${spcCommand} build --enable-zts --build-embed --build-frankenphp ${SPC_OPT_BUILD_ARGS} "${PHP_EXTENSIONS}" --with-libs="${PHP_EXTENSION_LIBS}"
209213

210214
if [ -n "$CI" ]; then

caddy/caddy_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,3 +1541,31 @@ func TestOpcacheReset(t *testing.T) {
15411541

15421542
wg.Wait()
15431543
}
1544+
1545+
func TestLog(t *testing.T) {
1546+
tester := caddytest.NewTester(t)
1547+
tester.InitServer(`
1548+
{
1549+
skip_install_trust
1550+
admin localhost:2999
1551+
}
1552+
1553+
http://localhost:`+testPort+` {
1554+
log {
1555+
output stdout
1556+
format json
1557+
}
1558+
1559+
root ../testdata
1560+
php_server {
1561+
worker ../testdata/log-frankenphp_log.php
1562+
}
1563+
}
1564+
`, "caddyfile")
1565+
1566+
tester.AssertGetResponse(
1567+
"http://localhost:"+testPort+"/log-frankenphp_log.php?i=0",
1568+
http.StatusOK,
1569+
"",
1570+
)
1571+
}

caddy/go.mod

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ require (
1010
github.com/caddyserver/caddy/v2 v2.10.2
1111
github.com/caddyserver/certmagic v0.25.0
1212
github.com/dunglas/caddy-cbrotli v1.0.1
13-
github.com/dunglas/frankenphp v1.10.1
14-
github.com/dunglas/mercure v0.21.2
15-
github.com/dunglas/mercure/caddy v0.21.2
13+
github.com/dunglas/frankenphp v1.11.1
14+
github.com/dunglas/mercure v0.21.4
15+
github.com/dunglas/mercure/caddy v0.21.4
1616
github.com/dunglas/vulcain/caddy v1.2.1
1717
github.com/prometheus/client_golang v1.23.2
18-
github.com/spf13/cobra v1.10.1
18+
github.com/spf13/cobra v1.10.2
1919
github.com/stretchr/testify v1.11.1
2020
)
2121

2222
require github.com/smallstep/go-attestation v0.4.4-0.20241119153605-2306d5b464ca // indirect
2323

2424
require (
2525
cel.dev/expr v0.25.1 // indirect
26-
cloud.google.com/go/auth v0.17.0 // indirect
26+
cloud.google.com/go/auth v0.18.0 // indirect
2727
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
2828
cloud.google.com/go/compute/metadata v0.9.0 // indirect
2929
dario.cat/mergo v1.0.2 // indirect
@@ -37,9 +37,8 @@ require (
3737
github.com/MauriceGit/skiplist v0.0.0-20211105230623-77f5c8d3e145 // indirect
3838
github.com/MicahParks/jwkset v0.11.0 // indirect
3939
github.com/MicahParks/keyfunc/v3 v3.7.0 // indirect
40-
github.com/Microsoft/go-winio v0.6.2 // indirect
4140
github.com/RoaringBitmap/roaring/v2 v2.14.4 // indirect
42-
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
41+
github.com/alecthomas/chroma/v2 v2.21.0 // indirect
4342
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
4443
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b // indirect
4544
github.com/beorn7/perks v1.0.1 // indirect
@@ -73,8 +72,8 @@ require (
7372
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
7473
github.com/go-logr/logr v1.4.3 // indirect
7574
github.com/go-logr/stdr v1.2.2 // indirect
76-
github.com/go-openapi/jsonpointer v0.22.3 // indirect
77-
github.com/go-openapi/swag/jsonname v0.25.3 // indirect
75+
github.com/go-openapi/jsonpointer v0.22.4 // indirect
76+
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
7877
github.com/go-sql-driver/mysql v1.9.3 // indirect
7978
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
8079
github.com/gofrs/uuid v4.4.0+incompatible // indirect
@@ -101,7 +100,7 @@ require (
101100
github.com/jackc/pgx/v5 v5.7.6 // indirect
102101
github.com/jackc/puddle/v2 v2.2.2 // indirect
103102
github.com/josharian/intern v1.0.0 // indirect
104-
github.com/klauspost/compress v1.18.1 // indirect
103+
github.com/klauspost/compress v1.18.2 // indirect
105104
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
106105
github.com/kylelemons/godebug v1.1.0 // indirect
107106
github.com/libdns/libdns v1.1.1 // indirect
@@ -112,7 +111,7 @@ require (
112111
github.com/maypok86/otter/v2 v2.2.1 // indirect
113112
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
114113
github.com/mholt/acmez/v3 v3.1.4 // indirect
115-
github.com/miekg/dns v1.1.68 // indirect
114+
github.com/miekg/dns v1.1.69 // indirect
116115
github.com/mitchellh/copystructure v1.2.0 // indirect
117116
github.com/mitchellh/go-ps v1.0.0 // indirect
118117
github.com/mitchellh/reflectwalk v1.0.2 // indirect
@@ -131,7 +130,7 @@ require (
131130
github.com/prometheus/common v0.67.4 // indirect
132131
github.com/prometheus/procfs v0.19.2 // indirect
133132
github.com/quic-go/qpack v0.6.0 // indirect
134-
github.com/quic-go/quic-go v0.57.0 // indirect
133+
github.com/quic-go/quic-go v0.57.1 // indirect
135134
github.com/rs/cors v1.11.1 // indirect
136135
github.com/rs/xid v1.6.0 // indirect
137136
github.com/russross/blackfriday/v2 v2.1.0 // indirect
@@ -153,7 +152,8 @@ require (
153152
github.com/spf13/viper v1.21.0 // indirect
154153
github.com/stoewer/go-strcase v1.3.1 // indirect
155154
github.com/subosito/gotenv v1.6.0 // indirect
156-
github.com/tailscale/tscert v0.0.0-20240608151842-d3f834017e53 // indirect
155+
github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 // indirect
156+
github.com/tailscale/tscert v0.0.0-20251216020129-aea342f6d747 // indirect
157157
github.com/tidwall/gjson v1.18.0 // indirect
158158
github.com/tidwall/match v1.2.0 // indirect
159159
github.com/tidwall/pretty v1.2.1 // indirect
@@ -168,44 +168,44 @@ require (
168168
github.com/zeebo/blake3 v0.2.4 // indirect
169169
go.etcd.io/bbolt v1.4.3 // indirect
170170
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
171-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
172-
go.opentelemetry.io/contrib/propagators/autoprop v0.63.0 // indirect
173-
go.opentelemetry.io/contrib/propagators/aws v1.38.0 // indirect
174-
go.opentelemetry.io/contrib/propagators/b3 v1.38.0 // indirect
175-
go.opentelemetry.io/contrib/propagators/jaeger v1.38.0 // indirect
176-
go.opentelemetry.io/contrib/propagators/ot v1.38.0 // indirect
177-
go.opentelemetry.io/otel v1.38.0 // indirect
178-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
179-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
180-
go.opentelemetry.io/otel/metric v1.38.0 // indirect
181-
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
182-
go.opentelemetry.io/otel/trace v1.38.0 // indirect
171+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect
172+
go.opentelemetry.io/contrib/propagators/autoprop v0.64.0 // indirect
173+
go.opentelemetry.io/contrib/propagators/aws v1.39.0 // indirect
174+
go.opentelemetry.io/contrib/propagators/b3 v1.39.0 // indirect
175+
go.opentelemetry.io/contrib/propagators/jaeger v1.39.0 // indirect
176+
go.opentelemetry.io/contrib/propagators/ot v1.39.0 // indirect
177+
go.opentelemetry.io/otel v1.39.0 // indirect
178+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
179+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 // indirect
180+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
181+
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
182+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
183183
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
184-
go.step.sm/crypto v0.74.0 // indirect
184+
go.step.sm/crypto v0.75.0 // indirect
185185
go.uber.org/automaxprocs v1.6.0 // indirect
186186
go.uber.org/multierr v1.11.0 // indirect
187187
go.uber.org/zap v1.27.1 // indirect
188188
go.uber.org/zap/exp v0.3.0 // indirect
189189
go.yaml.in/yaml/v2 v2.4.3 // indirect
190190
go.yaml.in/yaml/v3 v3.0.4 // indirect
191-
golang.org/x/crypto v0.45.0 // indirect
192-
golang.org/x/crypto/x509roots/fallback v0.0.0-20251119195548-4e0068c0098b // indirect
193-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
194-
golang.org/x/mod v0.30.0 // indirect
195-
golang.org/x/net v0.47.0 // indirect
196-
golang.org/x/oauth2 v0.33.0 // indirect
197-
golang.org/x/sync v0.18.0 // indirect
198-
golang.org/x/sys v0.38.0 // indirect
199-
golang.org/x/term v0.37.0 // indirect
200-
golang.org/x/text v0.31.0 // indirect
191+
golang.org/x/crypto v0.46.0 // indirect
192+
golang.org/x/crypto/x509roots/fallback v0.0.0-20251210140736-7dacc380ba00 // indirect
193+
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
194+
golang.org/x/mod v0.31.0 // indirect
195+
golang.org/x/net v0.48.0 // indirect
196+
golang.org/x/oauth2 v0.34.0 // indirect
197+
golang.org/x/sync v0.19.0 // indirect
198+
golang.org/x/sys v0.39.0 // indirect
199+
golang.org/x/term v0.38.0 // indirect
200+
golang.org/x/text v0.32.0 // indirect
201201
golang.org/x/time v0.14.0 // indirect
202-
golang.org/x/tools v0.39.0 // indirect
203-
google.golang.org/api v0.256.0 // indirect
204-
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba // indirect
205-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba // indirect
202+
golang.org/x/tools v0.40.0 // indirect
203+
google.golang.org/api v0.257.0 // indirect
204+
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 // indirect
205+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 // indirect
206206
google.golang.org/grpc v1.77.0 // indirect
207-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect
208-
google.golang.org/protobuf v1.36.10 // indirect
207+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.0 // indirect
208+
google.golang.org/protobuf v1.36.11 // indirect
209209
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
210210
gopkg.in/yaml.v3 v3.0.1 // indirect
211211
howett.net/plist v1.0.1 // indirect

0 commit comments

Comments
 (0)