mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
Compare commits
2 Commits
refactor/p
...
feat/frank
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79e3a98a11 | ||
|
|
afc4463ab3 |
@@ -6,6 +6,6 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
__debug_bin
|
__debug_bin
|
||||||
frankenphp.test
|
frankenphp.dev.test
|
||||||
caddy/frankenphp/Build
|
caddy/frankenphp/Build
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
2
.github/workflows/sanitizers.yaml
vendored
2
.github/workflows/sanitizers.yaml
vendored
@@ -101,4 +101,4 @@ jobs:
|
|||||||
- name: Compile tests
|
- name: Compile tests
|
||||||
run: go test ${{ matrix.sanitizer == 'msan' && '-tags=nowatcher' || '' }} -${{ matrix.sanitizer }} -v -x -c
|
run: go test ${{ matrix.sanitizer == 'msan' && '-tags=nowatcher' || '' }} -${{ matrix.sanitizer }} -v -x -c
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./frankenphp.test -test.v
|
run: ./frankenphp.dev.test -test.v
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,7 +6,7 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
__debug_bin
|
__debug_bin
|
||||||
frankenphp.test
|
frankenphp.dev.test
|
||||||
caddy/frankenphp/Build
|
caddy/frankenphp/Build
|
||||||
package/etc/php.ini
|
package/etc/php.ini
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
go test -tags watcher -c -ldflags=-w
|
go test -tags watcher -c -ldflags=-w
|
||||||
gdb --args frankenphp.test -test.run ^MyTest$
|
gdb --args frankenphp.dev.test -test.run ^MyTest$
|
||||||
```
|
```
|
||||||
|
|
||||||
9. When the bug is fixed, revert all these changes
|
9. When the bug is fixed, revert all these changes
|
||||||
@@ -214,6 +214,6 @@ follow these steps:
|
|||||||
3. Copy the `README.md` and `CONTRIBUTING.md` files from the root directory to the new directory
|
3. Copy the `README.md` and `CONTRIBUTING.md` files from the root directory to the new directory
|
||||||
4. Translate the content of the files, but don't change the filenames, also don't translate strings starting with `> [!` (it's special markup for GitHub)
|
4. Translate the content of the files, but don't change the filenames, also don't translate strings starting with `> [!` (it's special markup for GitHub)
|
||||||
5. Create a Pull Request with the translations
|
5. Create a Pull Request with the translations
|
||||||
6. In the [site repository](https://github.com/dunglas/frankenphp-website/tree/main), copy and translate the translation files in the `content/`, `data/` and `i18n/` directories
|
6. In the [site repository](https://github.com/dunglas/frankenphp-website), copy and translate the translation files in the `content/`, `data/` and `i18n/` directories
|
||||||
7. Translate the values in the created YAML file
|
7. Translate the values in the created YAML file
|
||||||
8. Open a Pull Request on the site repository
|
8. Open a Pull Request on the site repository
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ frankenphp php-server
|
|||||||
- [Laravel integration](https://frankenphp.dev/docs/laravel/)
|
- [Laravel integration](https://frankenphp.dev/docs/laravel/)
|
||||||
- [Known issues](https://frankenphp.dev/docs/known-issues/)
|
- [Known issues](https://frankenphp.dev/docs/known-issues/)
|
||||||
- [Demo app (Symfony) and benchmarks](https://github.com/dunglas/frankenphp-demo)
|
- [Demo app (Symfony) and benchmarks](https://github.com/dunglas/frankenphp-demo)
|
||||||
- [Go library documentation](https://pkg.go.dev/github.com/dunglas/frankenphp)
|
- [Go library documentation](https://pkg.go.dev/frankenphp.dev)
|
||||||
- [Contributing and debugging](https://frankenphp.dev/docs/contributing/)
|
- [Contributing and debugging](https://frankenphp.dev/docs/contributing/)
|
||||||
|
|
||||||
## Examples and Skeletons
|
## Examples and Skeletons
|
||||||
|
|||||||
@@ -330,8 +330,8 @@ CGO_ENABLED=1 \
|
|||||||
${XCADDY_COMMAND} build \
|
${XCADDY_COMMAND} build \
|
||||||
--output "../dist/${bin}" \
|
--output "../dist/${bin}" \
|
||||||
${XCADDY_ARGS} \
|
${XCADDY_ARGS} \
|
||||||
--with github.com/dunglas/frankenphp=.. \
|
--with frankenphp.dev=.. \
|
||||||
--with github.com/dunglas/frankenphp/caddy=.
|
--with frankenphp.dev/caddy=.
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
if [ -d "${EMBED}" ]; then
|
if [ -d "${EMBED}" ]; then
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/caddyserver/caddy/v2"
|
"github.com/caddyserver/caddy/v2"
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"frankenphp.dev"
|
||||||
|
"frankenphp.dev/internal/fastabs"
|
||||||
"github.com/caddyserver/caddy/v2/caddytest"
|
"github.com/caddyserver/caddy/v2/caddytest"
|
||||||
"github.com/dunglas/frankenphp"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
|
|
||||||
"github.com/caddyserver/caddy/v2"
|
"github.com/caddyserver/caddy/v2"
|
||||||
"github.com/caddyserver/caddy/v2/caddyconfig"
|
"github.com/caddyserver/caddy/v2/caddyconfig"
|
||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
|
||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
|
||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
"github.com/caddyserver/caddy/v2"
|
"github.com/caddyserver/caddy/v2"
|
||||||
"github.com/caddyserver/caddy/v2/caddytest"
|
"github.com/caddyserver/caddy/v2/caddytest"
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
"github.com/prometheus/client_golang/prometheus/testutil"
|
"github.com/prometheus/client_golang/prometheus/testutil"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
// plug in Caddy modules here.
|
// plug in Caddy modules here.
|
||||||
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||||
_ "github.com/dunglas/caddy-cbrotli"
|
_ "github.com/dunglas/caddy-cbrotli"
|
||||||
_ "github.com/dunglas/frankenphp/caddy"
|
_ "frankenphp.dev/caddy"
|
||||||
_ "github.com/dunglas/mercure/caddy"
|
_ "github.com/dunglas/mercure/caddy"
|
||||||
_ "github.com/dunglas/vulcain/caddy"
|
_ "github.com/dunglas/vulcain/caddy"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
module github.com/dunglas/frankenphp/caddy
|
module frankenphp.dev/caddy
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
replace github.com/dunglas/frankenphp => ../
|
replace frankenphp.dev => ../
|
||||||
|
|
||||||
retract v1.0.0-rc.1 // Human error
|
retract v1.0.0-rc.1 // Human error
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ require (
|
|||||||
github.com/caddyserver/caddy/v2 v2.10.0
|
github.com/caddyserver/caddy/v2 v2.10.0
|
||||||
github.com/caddyserver/certmagic v0.23.0
|
github.com/caddyserver/certmagic v0.23.0
|
||||||
github.com/dunglas/caddy-cbrotli v1.0.0
|
github.com/dunglas/caddy-cbrotli v1.0.0
|
||||||
github.com/dunglas/frankenphp v1.7.0
|
frankenphp.dev v1.7.0
|
||||||
github.com/dunglas/mercure/caddy v0.19.2
|
github.com/dunglas/mercure/caddy v0.19.2
|
||||||
github.com/dunglas/vulcain/caddy v1.2.0
|
github.com/dunglas/vulcain/caddy v1.2.0
|
||||||
github.com/prometheus/client_golang v1.22.0
|
github.com/prometheus/client_golang v1.22.0
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ github.com/dolthub/maphash v0.1.0 h1:bsQ7JsF4FkkWyrP3oCnFJgrCUAFbFf3kOl4L/QxPDyQ
|
|||||||
github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4=
|
github.com/dolthub/maphash v0.1.0/go.mod h1:gkg4Ch4CdCDu5h6PMriVLawB7koZ+5ijb9puGMV50a4=
|
||||||
github.com/dunglas/caddy-cbrotli v1.0.0 h1:+WNqXBkWyMcIpXB2rVZ3nwcElUbuAzf0kPxNXU4D+u0=
|
github.com/dunglas/caddy-cbrotli v1.0.0 h1:+WNqXBkWyMcIpXB2rVZ3nwcElUbuAzf0kPxNXU4D+u0=
|
||||||
github.com/dunglas/caddy-cbrotli v1.0.0/go.mod h1:KZsUu3fnQBgO0o3YDoQuO3Z61dFgUncr1F8rg8acwQw=
|
github.com/dunglas/caddy-cbrotli v1.0.0/go.mod h1:KZsUu3fnQBgO0o3YDoQuO3Z61dFgUncr1F8rg8acwQw=
|
||||||
|
github.com/dunglas/frankenphp v1.7.0/go.mod h1:BaPr7WO5PmAkMtJvRUhRcmdWNAuEIK1zWLC++c8GhE0=
|
||||||
github.com/dunglas/httpsfv v1.1.0 h1:Jw76nAyKWKZKFrpMMcL76y35tOpYHqQPzHQiwDvpe54=
|
github.com/dunglas/httpsfv v1.1.0 h1:Jw76nAyKWKZKFrpMMcL76y35tOpYHqQPzHQiwDvpe54=
|
||||||
github.com/dunglas/httpsfv v1.1.0/go.mod h1:zID2mqw9mFsnt7YC3vYQ9/cjq30q41W+1AnDwH8TiMg=
|
github.com/dunglas/httpsfv v1.1.0/go.mod h1:zID2mqw9mFsnt7YC3vYQ9/cjq30q41W+1AnDwH8TiMg=
|
||||||
github.com/dunglas/mercure v0.19.2 h1:eBMQhxvzJTenIffL+jlqtWO+TPevCjOQ+DQJb8iB6+s=
|
github.com/dunglas/mercure v0.19.2 h1:eBMQhxvzJTenIffL+jlqtWO+TPevCjOQ+DQJb8iB6+s=
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ import (
|
|||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
|
||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
|
||||||
"github.com/caddyserver/certmagic"
|
"github.com/caddyserver/certmagic"
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
2
cgi.go
2
cgi.go
@@ -18,7 +18,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/phpheaders"
|
"frankenphp.dev/internal/phpheaders"
|
||||||
)
|
)
|
||||||
|
|
||||||
var knownServerKeys = []string{
|
var knownServerKeys = []string{
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
go test -tags watcher -c -ldflags=-w
|
go test -tags watcher -c -ldflags=-w
|
||||||
gdb --args frankenphp.test -test.run ^MyTest$
|
gdb --args frankenphp.dev.test -test.run ^MyTest$
|
||||||
```
|
```
|
||||||
|
|
||||||
9. 当错误修复后,恢复所有这些更改
|
9. 当错误修复后,恢复所有这些更改
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ CGO_ENABLED=1 \
|
|||||||
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
|
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output frankenphp \
|
--output frankenphp \
|
||||||
--with github.com/dunglas/frankenphp/caddy \
|
--with frankenphp.dev/caddy \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
--with github.com/dunglas/vulcain/caddy
|
--with github.com/dunglas/vulcain/caddy
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ RUN CGO_ENABLED=1 \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output /usr/local/bin/frankenphp \
|
--output /usr/local/bin/frankenphp \
|
||||||
--with github.com/dunglas/frankenphp=./ \
|
--with frankenphp.dev=./ \
|
||||||
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
--with frankenphp.dev/caddy=./caddy/ \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
# Mercure 和 Vulcain 包含在官方版本中,如果不需要你可以删除它们
|
# Mercure 和 Vulcain 包含在官方版本中,如果不需要你可以删除它们
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ CGO_CFLAGS=$(php-config --includes) \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output frankenphp \
|
--output frankenphp \
|
||||||
--with github.com/dunglas/frankenphp/caddy \
|
--with frankenphp.dev/caddy \
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
--with github.com/dunglas/vulcain/caddy
|
--with github.com/dunglas/vulcain/caddy
|
||||||
# Add extra Caddy modules and FrankenPHP extensions here
|
# Add extra Caddy modules and FrankenPHP extensions here
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ RUN CGO_ENABLED=1 \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output /usr/local/bin/frankenphp \
|
--output /usr/local/bin/frankenphp \
|
||||||
--with github.com/dunglas/frankenphp=./ \
|
--with frankenphp.dev=./ \
|
||||||
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
--with frankenphp.dev/caddy=./caddy/ \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
# Mercure and Vulcain are included in the official build, but feel free to remove them
|
# Mercure and Vulcain are included in the official build, but feel free to remove them
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
go test -tags watcher -c -ldflags=-w
|
go test -tags watcher -c -ldflags=-w
|
||||||
gdb --args frankenphp.test -test.run ^MyTest$
|
gdb --args frankenphp.dev.test -test.run ^MyTest$
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Quand le bug est corrigé, annulez tous les changements.
|
9. Quand le bug est corrigé, annulez tous les changements.
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ CGO_CFLAGS=$(php-config --includes) \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output frankenphp \
|
--output frankenphp \
|
||||||
--with github.com/dunglas/frankenphp/caddy \
|
--with frankenphp.dev/caddy \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
--with github.com/dunglas/vulcain/caddy
|
--with github.com/dunglas/vulcain/caddy
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ RUN CGO_ENABLED=1 \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output /usr/local/bin/frankenphp \
|
--output /usr/local/bin/frankenphp \
|
||||||
--with github.com/dunglas/frankenphp=./ \
|
--with frankenphp.dev=./ \
|
||||||
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
--with frankenphp.dev/caddy=./caddy/ \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
# Mercure et Vulcain sont inclus dans la construction officielle, mais n'hésitez pas à les retirer
|
# Mercure et Vulcain sont inclus dans la construction officielle, mais n'hésitez pas à les retirer
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
go test -tags watcher -c -ldflags=-w
|
go test -tags watcher -c -ldflags=-w
|
||||||
gdb --args frankenphp.test -test.run ^MyTest$
|
gdb --args frankenphp.dev.test -test.run ^MyTest$
|
||||||
```
|
```
|
||||||
|
|
||||||
9. После исправления ошибки откатите все внесенные изменения.
|
9. После исправления ошибки откатите все внесенные изменения.
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ CGO_CFLAGS=$(php-config --includes) \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output frankenphp \
|
--output frankenphp \
|
||||||
--with github.com/dunglas/frankenphp/caddy \
|
--with frankenphp.dev/caddy \
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
--with github.com/dunglas/vulcain/caddy
|
--with github.com/dunglas/vulcain/caddy
|
||||||
# Добавьте дополнительные модули Caddy здесь
|
# Добавьте дополнительные модули Caddy здесь
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ RUN CGO_ENABLED=1 \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output /usr/local/bin/frankenphp \
|
--output /usr/local/bin/frankenphp \
|
||||||
--with github.com/dunglas/frankenphp=./ \
|
--with frankenphp.dev=./ \
|
||||||
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
--with frankenphp.dev/caddy=./caddy/ \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
# Mercure и Vulcain включены в официальный билд, но вы можете их удалить
|
# Mercure и Vulcain включены в официальный билд, но вы можете их удалить
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
go test -tags watcher -c -ldflags=-w
|
go test -tags watcher -c -ldflags=-w
|
||||||
gdb --args frankenphp.test -test.run ^MyTest$
|
gdb --args frankenphp.dev.test -test.run ^MyTest$
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Hata düzeltildiğinde, tüm bu değişiklikleri geri alın
|
9. Hata düzeltildiğinde, tüm bu değişiklikleri geri alın
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ CGO_ENABLED=1 \
|
|||||||
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
|
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output frankenphp \
|
--output frankenphp \
|
||||||
--with github.com/dunglas/frankenphp/caddy \
|
--with frankenphp.dev/caddy \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
--with github.com/dunglas/vulcain/caddy
|
--with github.com/dunglas/vulcain/caddy
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ RUN CGO_ENABLED=1 \
|
|||||||
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
||||||
xcaddy build \
|
xcaddy build \
|
||||||
--output /usr/local/bin/frankenphp \
|
--output /usr/local/bin/frankenphp \
|
||||||
--with github.com/dunglas/frankenphp=./ \
|
--with frankenphp.dev=./ \
|
||||||
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
|
--with frankenphp.dev/caddy=./caddy/ \
|
||||||
--with github.com/dunglas/caddy-cbrotli \
|
--with github.com/dunglas/caddy-cbrotli \
|
||||||
# Mercure ve Vulcain resmi yapıya dahil edilmiştir, ancak bunları kaldırmaktan çekinmeyin
|
# Mercure ve Vulcain resmi yapıya dahil edilmiştir, ancak bunları kaldırmaktan çekinmeyin
|
||||||
--with github.com/dunglas/mercure/caddy \
|
--with github.com/dunglas/mercure/caddy \
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"go.uber.org/zap/exp/zapslog"
|
"go.uber.org/zap/exp/zapslog"
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/dunglas/frankenphp
|
module frankenphp.dev
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type watchPattern struct {
|
type watchPattern struct {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/memory"
|
"frankenphp.dev/internal/memory"
|
||||||
"github.com/dunglas/frankenphp/internal/phpheaders"
|
"frankenphp.dev/internal/phpheaders"
|
||||||
)
|
)
|
||||||
|
|
||||||
// represents the main PHP thread
|
// represents the main PHP thread
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/phpheaders"
|
"frankenphp.dev/internal/phpheaders"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RequestOption instances allow to configure a FrankenPHP Request.
|
// RequestOption instances allow to configure a FrankenPHP Request.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/cpu"
|
"frankenphp.dev/internal/cpu"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp/internal/fastabs"
|
"frankenphp.dev/internal/fastabs"
|
||||||
"github.com/dunglas/frankenphp/internal/watcher"
|
"frankenphp.dev/internal/watcher"
|
||||||
)
|
)
|
||||||
|
|
||||||
// represents a worker script and can have many threads assigned to it
|
// represents a worker script and can have many threads assigned to it
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/dunglas/frankenphp"
|
"frankenphp.dev"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"go.uber.org/zap/exp/zapslog"
|
"go.uber.org/zap/exp/zapslog"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
|
|||||||
Reference in New Issue
Block a user