Skip to content

Commit 77b2730

Browse files
authored
Merge branch 'main' into rpm
2 parents 6b0369a + ffa52f7 commit 77b2730

55 files changed

Lines changed: 2213 additions & 2196 deletions

Some content is hidden

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

.github/dependabot.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ updates:
77
interval: weekly
88
commit-message:
99
prefix: chore
10+
groups:
11+
go-modules:
12+
patterns:
13+
- "*"
1014
- package-ecosystem: gomod
1115
directory: /caddy
1216
schedule:
@@ -18,9 +22,17 @@ updates:
1822
ignore:
1923
- dependency-name: github.com/google/cel-go
2024
- dependency-name: github.com/quic-go/*
25+
groups:
26+
go-modules:
27+
patterns:
28+
- "*"
2129
- package-ecosystem: github-actions
2230
directory: /
2331
schedule:
2432
interval: weekly
2533
commit-message:
2634
prefix: ci
35+
groups:
36+
github-actions:
37+
patterns:
38+
- "*"

CONTRIBUTING.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
111111

112112
1. Download the debug version of the FrankenPHP binary from GitHub or create your custom static build including debug symbols:
113113

114-
```console
115-
docker buildx bake \
116-
--load \
117-
--set static-builder.args.DEBUG_SYMBOLS=1 \
118-
--set "static-builder.platform=linux/amd64" \
119-
static-builder
120-
docker cp $(docker create --name static-builder-musl dunglas/frankenphp:static-builder-musl):/go/src/app/dist/frankenphp-linux-$(uname -m) frankenphp
121-
```
114+
```console
115+
docker buildx bake \
116+
--load \
117+
--set static-builder.args.DEBUG_SYMBOLS=1 \
118+
--set "static-builder.platform=linux/amd64" \
119+
static-builder
120+
docker cp $(docker create --name static-builder-musl dunglas/frankenphp:static-builder-musl):/go/src/app/dist/frankenphp-linux-$(uname -m) frankenphp
121+
```
122122

123123
2. Replace your current version of `frankenphp` by the debug FrankenPHP executable
124124
3. Start FrankenPHP as usual (alternatively, you can directly start FrankenPHP with GDB: `gdb --args frankenphp run`)
125125
4. Attach to the process with GDB:
126126

127-
```console
128-
gdb -p `pidof frankenphp`
129-
```
127+
```console
128+
gdb -p `pidof frankenphp`
129+
```
130130

131131
5. If necessary, type `continue` in the GDB shell
132132
6. Make FrankenPHP crash
@@ -138,60 +138,60 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
138138
1. Open `.github/workflows/tests.yml`
139139
2. Enable PHP debug symbols
140140

141-
```patch
142-
- uses: shivammathur/setup-php@v2
143-
# ...
144-
env:
145-
phpts: ts
146-
+ debug: true
147-
```
141+
```patch
142+
- uses: shivammathur/setup-php@v2
143+
# ...
144+
env:
145+
phpts: ts
146+
+ debug: true
147+
```
148148

149149
3. Enable `tmate` to connect to the container
150150

151-
```patch
152-
- name: Set CGO flags
153-
run: echo "CGO_CFLAGS=$(php-config --includes)" >> "$GITHUB_ENV"
154-
+ - run: |
155-
+ sudo apt install gdb
156-
+ mkdir -p /home/runner/.config/gdb/
157-
+ printf "set auto-load safe-path /\nhandle SIG34 nostop noprint pass" > /home/runner/.config/gdb/gdbinit
158-
+ - uses: mxschmitt/action-tmate@v3
159-
```
151+
```patch
152+
- name: Set CGO flags
153+
run: echo "CGO_CFLAGS=$(php-config --includes)" >> "$GITHUB_ENV"
154+
+ - run: |
155+
+ sudo apt install gdb
156+
+ mkdir -p /home/runner/.config/gdb/
157+
+ printf "set auto-load safe-path /\nhandle SIG34 nostop noprint pass" > /home/runner/.config/gdb/gdbinit
158+
+ - uses: mxschmitt/action-tmate@v3
159+
```
160160

161161
4. Connect to the container
162162
5. Open `frankenphp.go`
163163
6. Enable `cgosymbolizer`
164164

165-
```patch
166-
- //_ "github.com/ianlancetaylor/cgosymbolizer"
167-
+ _ "github.com/ianlancetaylor/cgosymbolizer"
168-
```
165+
```patch
166+
- //_ "github.com/ianlancetaylor/cgosymbolizer"
167+
+ _ "github.com/ianlancetaylor/cgosymbolizer"
168+
```
169169

170170
7. Download the module: `go get`
171171
8. In the container, you can use GDB and the like:
172172

173-
```console
174-
go test -tags watcher -c -ldflags=-w
175-
gdb --args frankenphp.test -test.run ^MyTest$
176-
```
173+
```console
174+
go test -tags watcher -c -ldflags=-w
175+
gdb --args frankenphp.test -test.run ^MyTest$
176+
```
177177

178178
9. When the bug is fixed, revert all these changes
179179

180180
## Misc Dev Resources
181181

182-
* [PHP embedding in uWSGI](https://github.com/unbit/uwsgi/blob/master/plugins/php/php_plugin.c)
183-
* [PHP embedding in NGINX Unit](https://github.com/nginx/unit/blob/master/src/nxt_php_sapi.c)
184-
* [PHP embedding in Go (go-php)](https://github.com/deuill/go-php)
185-
* [PHP embedding in Go (GoEmPHP)](https://github.com/mikespook/goemphp)
186-
* [PHP embedding in C++](https://gist.github.com/paresy/3cbd4c6a469511ac7479aa0e7c42fea7)
187-
* [Extending and Embedding PHP by Sara Golemon](https://books.google.fr/books?id=zMbGvK17_tYC&pg=PA254&lpg=PA254#v=onepage&q&f=false)
188-
* [What the heck is TSRMLS_CC, anyway?](http://blog.golemon.com/2006/06/what-heck-is-tsrmlscc-anyway.html)
189-
* [SDL bindings](https://pkg.go.dev/github.com/veandco/go-sdl2@v0.4.21/sdl#Main)
182+
- [PHP embedding in uWSGI](https://github.com/unbit/uwsgi/blob/master/plugins/php/php_plugin.c)
183+
- [PHP embedding in NGINX Unit](https://github.com/nginx/unit/blob/master/src/nxt_php_sapi.c)
184+
- [PHP embedding in Go (go-php)](https://github.com/deuill/go-php)
185+
- [PHP embedding in Go (GoEmPHP)](https://github.com/mikespook/goemphp)
186+
- [PHP embedding in C++](https://gist.github.com/paresy/3cbd4c6a469511ac7479aa0e7c42fea7)
187+
- [Extending and Embedding PHP by Sara Golemon](https://books.google.fr/books?id=zMbGvK17_tYC&pg=PA254&lpg=PA254#v=onepage&q&f=false)
188+
- [What the heck is TSRMLS_CC, anyway?](http://blog.golemon.com/2006/06/what-heck-is-tsrmlscc-anyway.html)
189+
- [SDL bindings](https://pkg.go.dev/github.com/veandco/go-sdl2@v0.4.21/sdl#Main)
190190

191191
## Docker-Related Resources
192192

193-
* [Bake file definition](https://docs.docker.com/build/customize/bake/file-definition/)
194-
* [docker buildx build](https://docs.docker.com/engine/reference/commandline/buildx_build/)
193+
- [Bake file definition](https://docs.docker.com/build/customize/bake/file-definition/)
194+
- [docker buildx build](https://docs.docker.com/engine/reference/commandline/buildx_build/)
195195

196196
## Useful Command
197197

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
FrankenPHP is a modern application server for PHP built on top of the [Caddy](https://caddyserver.com/) web server.
66

7-
FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: [*Early Hints*](https://frankenphp.dev/docs/early-hints/), [worker mode](https://frankenphp.dev/docs/worker/), [real-time capabilities](https://frankenphp.dev/docs/mercure/), automatic HTTPS, HTTP/2, and HTTP/3 support...
7+
FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: [_Early Hints_](https://frankenphp.dev/docs/early-hints/), [worker mode](https://frankenphp.dev/docs/worker/), [real-time capabilities](https://frankenphp.dev/docs/mercure/), automatic HTTPS, HTTP/2, and HTTP/3 support...
88

99
FrankenPHP works with any PHP app and makes your Laravel and Symfony projects faster than ever thanks to their official integrations with the worker mode.
1010

1111
FrankenPHP can also be used as a standalone Go library to embed PHP in any app using `net/http`.
1212

13-
[**Learn more** on *frankenphp.dev*](https://frankenphp.dev) and in this slide deck:
13+
[**Learn more** on _frankenphp.dev_](https://frankenphp.dev) and in this slide deck:
1414

1515
<a href="https://dunglas.dev/2022/10/frankenphp-the-modern-php-app-server-written-in-go/"><img src="https://dunglas.dev/wp-content/uploads/2022/10/frankenphp.png" alt="Slides" width="600"></a>
1616

@@ -84,33 +84,33 @@ frankenphp php-server
8484

8585
## Docs
8686

87-
* [Classic mode](https://frankenphp.dev/docs/classic/)
88-
* [Worker mode](https://frankenphp.dev/docs/worker/)
89-
* [Early Hints support (103 HTTP status code)](https://frankenphp.dev/docs/early-hints/)
90-
* [Real-time](https://frankenphp.dev/docs/mercure/)
91-
* [Efficiently Serving Large Static Files](https://frankenphp.dev/docs/x-sendfile/)
92-
* [Configuration](https://frankenphp.dev/docs/config/)
93-
* [Docker images](https://frankenphp.dev/docs/docker/)
94-
* [Deploy in production](https://frankenphp.dev/docs/production/)
95-
* [Performance optimization](https://frankenphp.dev/docs/performance/)
96-
* [Create **standalone**, self-executable PHP apps](https://frankenphp.dev/docs/embed/)
97-
* [Create static binaries](https://frankenphp.dev/docs/static/)
98-
* [Compile from sources](https://frankenphp.dev/docs/compile/)
99-
* [Monitoring FrankenPHP](https://frankenphp.dev/docs/metrics/)
100-
* [Laravel integration](https://frankenphp.dev/docs/laravel/)
101-
* [Known issues](https://frankenphp.dev/docs/known-issues/)
102-
* [Demo app (Symfony) and benchmarks](https://github.com/dunglas/frankenphp-demo)
103-
* [Go library documentation](https://pkg.go.dev/github.com/dunglas/frankenphp)
104-
* [Contributing and debugging](https://frankenphp.dev/docs/contributing/)
87+
- [Classic mode](https://frankenphp.dev/docs/classic/)
88+
- [Worker mode](https://frankenphp.dev/docs/worker/)
89+
- [Early Hints support (103 HTTP status code)](https://frankenphp.dev/docs/early-hints/)
90+
- [Real-time](https://frankenphp.dev/docs/mercure/)
91+
- [Efficiently Serving Large Static Files](https://frankenphp.dev/docs/x-sendfile/)
92+
- [Configuration](https://frankenphp.dev/docs/config/)
93+
- [Docker images](https://frankenphp.dev/docs/docker/)
94+
- [Deploy in production](https://frankenphp.dev/docs/production/)
95+
- [Performance optimization](https://frankenphp.dev/docs/performance/)
96+
- [Create **standalone**, self-executable PHP apps](https://frankenphp.dev/docs/embed/)
97+
- [Create static binaries](https://frankenphp.dev/docs/static/)
98+
- [Compile from sources](https://frankenphp.dev/docs/compile/)
99+
- [Monitoring FrankenPHP](https://frankenphp.dev/docs/metrics/)
100+
- [Laravel integration](https://frankenphp.dev/docs/laravel/)
101+
- [Known issues](https://frankenphp.dev/docs/known-issues/)
102+
- [Demo app (Symfony) and benchmarks](https://github.com/dunglas/frankenphp-demo)
103+
- [Go library documentation](https://pkg.go.dev/github.com/dunglas/frankenphp)
104+
- [Contributing and debugging](https://frankenphp.dev/docs/contributing/)
105105

106106
## Examples and Skeletons
107107

108-
* [Symfony](https://github.com/dunglas/symfony-docker)
109-
* [API Platform](https://api-platform.com/docs/symfony)
110-
* [Laravel](https://frankenphp.dev/docs/laravel/)
111-
* [Sulu](https://sulu.io/blog/running-sulu-with-frankenphp)
112-
* [WordPress](https://github.com/StephenMiracle/frankenwp)
113-
* [Drupal](https://github.com/dunglas/frankenphp-drupal)
114-
* [Joomla](https://github.com/alexandreelise/frankenphp-joomla)
115-
* [TYPO3](https://github.com/ochorocho/franken-typo3)
116-
* [Magento2](https://github.com/ekino/frankenphp-magento2)
108+
- [Symfony](https://github.com/dunglas/symfony-docker)
109+
- [API Platform](https://api-platform.com/docs/symfony)
110+
- [Laravel](https://frankenphp.dev/docs/laravel/)
111+
- [Sulu](https://sulu.io/blog/running-sulu-with-frankenphp)
112+
- [WordPress](https://github.com/StephenMiracle/frankenwp)
113+
- [Drupal](https://github.com/dunglas/frankenphp-drupal)
114+
- [Joomla](https://github.com/alexandreelise/frankenphp-joomla)
115+
- [TYPO3](https://github.com/ochorocho/franken-typo3)
116+
- [Magento2](https://github.com/ekino/frankenphp-magento2)

0 commit comments

Comments
 (0)