frankenphp/CONTRIBUTING.md
2022-10-19 11:19:49 +02:00

1.9 KiB

Contributing

Compiling PHP

With Docker (Linux)

Build the dev Docker image:

docker -t frankenphp-dev -f Dockerfile.dev .
docker run -p 8080:8080 -p 443:443 -v $PWD:/go/src/app -it frankenphp-dev

The image contains the usual development tools (Go, GDB, Valgrind, Neovim...).

Without Docker (Linux and macOS)

Follow the instructions to compile from sources and pass the --debug configuration flag.

Running the test suite

go test -race -v ./...

Caddy module

Build Caddy with the FrankenPHP Caddy module:

cd caddy/frankenphp/
go build
cd ../../

Run the Caddy with the FrankenPHP Caddy module:

cd testdata/
../caddy/frankenphp/frankenphp run

The server is listening on 127.0.0.1:8080:

curl -vk https://localhosy/phpinfo.php

Minimal test server

Build the minimal test server:

cd internal/testserver/
go build
cd ../../

Run the test server:

cd testdata/
../internal/testserver/testserver

The server is listening on 127.0.0.1:8080:

curl -v http://127.0.0.1:8080/phpinfo.php

Misc Dev Resources