Compare commits

...

2 Commits

Author SHA1 Message Date
Kévin Dunglas
79e3a98a11 fix 2025-06-05 18:08:52 +02:00
Kévin Dunglas
afc4463ab3 feat: use frankenphp.dev as Go module path 2025-06-05 18:01:54 +02:00
41 changed files with 56 additions and 56 deletions

View File

@@ -6,6 +6,6 @@
.idea/
.vscode/
__debug_bin
frankenphp.test
frankenphp.dev.test
caddy/frankenphp/Build
*.log

View File

@@ -101,4 +101,4 @@ jobs:
- name: Compile tests
run: go test ${{ matrix.sanitizer == 'msan' && '-tags=nowatcher' || '' }} -${{ matrix.sanitizer }} -v -x -c
- name: Run tests
run: ./frankenphp.test -test.v
run: ./frankenphp.dev.test -test.v

2
.gitignore vendored
View File

@@ -6,7 +6,7 @@
.idea/
.vscode/
__debug_bin
frankenphp.test
frankenphp.dev.test
caddy/frankenphp/Build
package/etc/php.ini
*.log

View File

@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
```console
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
@@ -214,6 +214,6 @@ follow these steps:
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)
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
8. Open a Pull Request on the site repository

View File

@@ -94,7 +94,7 @@ frankenphp php-server
- [Laravel integration](https://frankenphp.dev/docs/laravel/)
- [Known issues](https://frankenphp.dev/docs/known-issues/)
- [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/)
## Examples and Skeletons

View File

@@ -330,8 +330,8 @@ CGO_ENABLED=1 \
${XCADDY_COMMAND} build \
--output "../dist/${bin}" \
${XCADDY_ARGS} \
--with github.com/dunglas/frankenphp=.. \
--with github.com/dunglas/frankenphp/caddy=.
--with frankenphp.dev=.. \
--with frankenphp.dev/caddy=.
cd ..
if [ -d "${EMBED}" ]; then

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"github.com/caddyserver/caddy/v2"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
"net/http"
)

View File

@@ -4,14 +4,14 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/dunglas/frankenphp/internal/fastabs"
"io"
"net/http"
"sync"
"testing"
"frankenphp.dev"
"frankenphp.dev/internal/fastabs"
"github.com/caddyserver/caddy/v2/caddytest"
"github.com/dunglas/frankenphp"
"github.com/stretchr/testify/assert"
)

View File

@@ -14,7 +14,7 @@ import (
"strings"
"time"
"github.com/dunglas/frankenphp/internal/fastabs"
"frankenphp.dev/internal/fastabs"
"github.com/caddyserver/caddy/v2"
"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/fileserver"
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
)
const (

View File

@@ -14,8 +14,8 @@ import (
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddytest"
"github.com/dunglas/frankenphp"
"github.com/dunglas/frankenphp/internal/fastabs"
"frankenphp.dev"
"frankenphp.dev/internal/fastabs"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/require"
)

View File

@@ -6,7 +6,7 @@ import (
// plug in Caddy modules here.
_ "github.com/caddyserver/caddy/v2/modules/standard"
_ "github.com/dunglas/caddy-cbrotli"
_ "github.com/dunglas/frankenphp/caddy"
_ "frankenphp.dev/caddy"
_ "github.com/dunglas/mercure/caddy"
_ "github.com/dunglas/vulcain/caddy"
)

View File

@@ -1,8 +1,8 @@
module github.com/dunglas/frankenphp/caddy
module frankenphp.dev/caddy
go 1.24.0
replace github.com/dunglas/frankenphp => ../
replace frankenphp.dev => ../
retract v1.0.0-rc.1 // Human error
@@ -10,7 +10,7 @@ require (
github.com/caddyserver/caddy/v2 v2.10.0
github.com/caddyserver/certmagic v0.23.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/vulcain/caddy v1.2.0
github.com/prometheus/client_golang v1.22.0

View File

@@ -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/dunglas/caddy-cbrotli v1.0.0 h1:+WNqXBkWyMcIpXB2rVZ3nwcElUbuAzf0kPxNXU4D+u0=
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/go.mod h1:zID2mqw9mFsnt7YC3vYQ9/cjq30q41W+1AnDwH8TiMg=
github.com/dunglas/mercure v0.19.2 h1:eBMQhxvzJTenIffL+jlqtWO+TPevCjOQ+DQJb8iB6+s=

View File

@@ -6,7 +6,7 @@ import (
"path/filepath"
caddycmd "github.com/caddyserver/caddy/v2/cmd"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
"github.com/spf13/cobra"
)

View File

@@ -20,8 +20,7 @@ import (
"github.com/caddyserver/caddy/v2/modules/caddyhttp/fileserver"
"github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
"github.com/caddyserver/certmagic"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
"github.com/spf13/cobra"
)

2
cgi.go
View File

@@ -18,7 +18,7 @@ import (
"strings"
"unsafe"
"github.com/dunglas/frankenphp/internal/phpheaders"
"frankenphp.dev/internal/phpheaders"
)
var knownServerKeys = []string{

View File

@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
```console
go test -tags watcher -c -ldflags=-w
gdb --args frankenphp.test -test.run ^MyTest$
gdb --args frankenphp.dev.test -test.run ^MyTest$
```
9. 当错误修复后,恢复所有这些更改

View File

@@ -80,7 +80,7 @@ CGO_ENABLED=1 \
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
--with frankenphp.dev/caddy \
--with github.com/dunglas/caddy-cbrotli \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy

View File

@@ -57,8 +57,8 @@ RUN CGO_ENABLED=1 \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with frankenphp.dev=./ \
--with frankenphp.dev/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure 和 Vulcain 包含在官方版本中,如果不需要你可以删除它们
--with github.com/dunglas/mercure/caddy \

View File

@@ -100,7 +100,7 @@ CGO_CFLAGS=$(php-config --includes) \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
--with frankenphp.dev/caddy \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy
# Add extra Caddy modules and FrankenPHP extensions here

View File

@@ -65,8 +65,8 @@ RUN CGO_ENABLED=1 \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with frankenphp.dev=./ \
--with frankenphp.dev/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure and Vulcain are included in the official build, but feel free to remove them
--with github.com/dunglas/mercure/caddy \

View File

@@ -177,7 +177,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
```console
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.

View File

@@ -100,7 +100,7 @@ CGO_CFLAGS=$(php-config --includes) \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
--with frankenphp.dev/caddy \
--with github.com/dunglas/caddy-cbrotli \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy

View File

@@ -65,8 +65,8 @@ RUN CGO_ENABLED=1 \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with frankenphp.dev=./ \
--with frankenphp.dev/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure et Vulcain sont inclus dans la construction officielle, mais n'hésitez pas à les retirer
--with github.com/dunglas/mercure/caddy \

View File

@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
```console
go test -tags watcher -c -ldflags=-w
gdb --args frankenphp.test -test.run ^MyTest$
gdb --args frankenphp.dev.test -test.run ^MyTest$
```
9. После исправления ошибки откатите все внесенные изменения.

View File

@@ -92,7 +92,7 @@ CGO_CFLAGS=$(php-config --includes) \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
--with frankenphp.dev/caddy \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy
# Добавьте дополнительные модули Caddy здесь

View File

@@ -64,8 +64,8 @@ RUN CGO_ENABLED=1 \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with frankenphp.dev=./ \
--with frankenphp.dev/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure и Vulcain включены в официальный билд, но вы можете их удалить
--with github.com/dunglas/mercure/caddy \

View File

@@ -176,7 +176,7 @@ docker buildx bake -f docker-bake.hcl --pull --no-cache --push
```console
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

View File

@@ -82,7 +82,7 @@ CGO_ENABLED=1 \
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
--with frankenphp.dev/caddy \
--with github.com/dunglas/caddy-cbrotli \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy

View File

@@ -58,8 +58,8 @@ RUN CGO_ENABLED=1 \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with frankenphp.dev=./ \
--with frankenphp.dev/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure ve Vulcain resmi yapıya dahil edilmiştir, ancak bunları kaldırmaktan çekinmeyin
--with github.com/dunglas/mercure/caddy \

View File

@@ -27,8 +27,8 @@ import (
"sync"
"testing"
"github.com/dunglas/frankenphp"
"github.com/dunglas/frankenphp/internal/fastabs"
"frankenphp.dev"
"frankenphp.dev/internal/fastabs"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/zap/exp/zapslog"

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/dunglas/frankenphp
module frankenphp.dev
go 1.24.0

View File

@@ -4,7 +4,7 @@ import (
"log"
"os"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
)
func main() {

View File

@@ -6,7 +6,7 @@ import (
"net/http"
"os"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"
"github.com/dunglas/frankenphp/internal/fastabs"
"frankenphp.dev/internal/fastabs"
)
type watchPattern struct {

View File

@@ -13,8 +13,8 @@ import (
"strings"
"sync"
"github.com/dunglas/frankenphp/internal/memory"
"github.com/dunglas/frankenphp/internal/phpheaders"
"frankenphp.dev/internal/memory"
"frankenphp.dev/internal/phpheaders"
)
// represents the main PHP thread

View File

@@ -12,7 +12,7 @@ import (
"testing"
"time"
"github.com/dunglas/frankenphp/internal/phpheaders"
"frankenphp.dev/internal/phpheaders"
"github.com/stretchr/testify/assert"
)

View File

@@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"
"github.com/dunglas/frankenphp/internal/fastabs"
"frankenphp.dev/internal/fastabs"
)
// RequestOption instances allow to configure a FrankenPHP Request.

View File

@@ -10,7 +10,7 @@ import (
"sync"
"time"
"github.com/dunglas/frankenphp/internal/cpu"
"frankenphp.dev/internal/cpu"
)
const (

View File

@@ -8,8 +8,8 @@ import (
"sync"
"time"
"github.com/dunglas/frankenphp/internal/fastabs"
"github.com/dunglas/frankenphp/internal/watcher"
"frankenphp.dev/internal/fastabs"
"frankenphp.dev/internal/watcher"
)
// represents a worker script and can have many threads assigned to it

View File

@@ -15,7 +15,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/dunglas/frankenphp"
"frankenphp.dev"
"github.com/stretchr/testify/assert"
"go.uber.org/zap/exp/zapslog"
"go.uber.org/zap/zapcore"