{ "name": "frankenphp", "version": "1.13.1", "summary": "FrankenPHP: a PHP application server on Caddy, PHP in classic and worker mode in one process (on php85-zts)", "category": "server", "license": "MIT AND Apache-2.0", "homepage": "https://frankenphp.dev/", "source": { "url": "https://proxy.golang.org/github.com/dunglas/frankenphp/@v/v1.13.1.zip", "sha256": "0135a2efffe973f016d579ba63690b223550daf5511da93fdd1a8860f751776a" }, "vendor": "vendor.txt", "watch": {"kind": "index", "url": "https://proxy.golang.org/github.com/dunglas/frankenphp/@v/list", "regex": "(?m)^v([0-9]+\\.[0-9]+\\.[0-9]+)$", "revendor": {"tool": "go", "args": ["./frankenphp"], "dir": "caddy", "module": "github.com/dunglas/frankenphp/caddy", "tags": "TAGS", "cgo": true}}, "deps": [ "php85-zts" ], "env_packages": [], "static": false, "nss": true, "check": "php=bin/php8.5-zts && v=$(bin/frankenphp version) && printf '%s\\n' \"$v\" | has '^FrankenPHP 1\\.13\\.1 PHP 8\\.5\\.12 Caddy' && ended() { for i in $(seq 1 100); do grep -qs '^State:[[:space:]]*[^Z[:space:]]' \"/proc/$1/status\" || { wait \"$1\"; return; }; sleep 0.2; done; return 124; } && t=$(mktemp -d) && chmod 755 \"$t\" && bin/frankenphp list-modules > \"$t/modules\" && has -x frankenphp < \"$t/modules\" && has -x http.handlers.php < \"$t/modules\" && ! has -i -e mercure -e vulcain < \"$t/modules\" && ! has -x http.encoders.br < \"$t/modules\" && [ \"$(bin/frankenphp php-cli -r 'echo PHP_VERSION, \" \", PHP_ZTS, \" \", extension_loaded(\"intl\") ? \"intl\" : \"-\";')\" = \"8.5.12 1 intl\" ] && p=$(free_port) && q=$(free_port) && while [ \"$q\" = \"$p\" ]; do q=$(free_port); done && mkdir \"$t/classic\" \"$t/worker\" \"$t/home\" && cat > \"$t/classic/index.php\" <<'PHP' &&\n \"$t/worker/index.php\" <<'PHP' &&\n \"$t/Caddyfile\" && chown -R 65534:65534 \"$t/home\" && { setpriv --reuid=65534 --regid=65534 --clear-groups env HOME=\"$t/home\" XDG_CONFIG_HOME=\"$t/home/config\" XDG_DATA_HOME=\"$t/home/data\" bin/frankenphp run --config \"$t/Caddyfile\" --adapter caddyfile > \"$t/out.log\" 2>&1 & pid=$!; } && wait_port \"$p\" && wait_port \"$q\" && get() { $php -r '$r = @file_get_contents($argv[1]); if ($r === false) exit(1); echo $r, \"|\", implode(\";\", array_filter(http_get_last_response_headers() ?? [], fn($h) => stripos($h, \"Server:\") === 0));' \"$1\"; } && c1=$(get \"http://127.0.0.1:$p/?x=a\") && c2=$(get \"http://127.0.0.1:$p/?x=b\") && [ \"$c1\" = \"classic 8.5.12 frankenphp uid 65534 n 1 a|Server: FrankenPHP Caddy\" ] && [ \"$c2\" = \"classic 8.5.12 frankenphp uid 65534 n 1 b|Server: FrankenPHP Caddy\" ] && w1=$(get \"http://127.0.0.1:$q/?x=a\") && w2=$(get \"http://127.0.0.1:$q/?x=b\") && printf '%s\\n' \"$w1\" | has -Ex 'worker frankenphp uid 65534 boot [0-9a-f]{8} n 1 a\\|Server: FrankenPHP Caddy' && [ \"$w2\" = \"$(printf '%s\\n' \"$w1\" | sed 's/ n 1 a|/ n 2 b|/')\" ] && kill -TERM \"$pid\" && { ended \"$pid\"; e=$?; [ $e = 124 ] || pid=; [ $e = 0 ]; } && ! get \"http://127.0.0.1:$p/\" > /dev/null 2>&1; r=$?; [ -n \"${pid:-}\" ] && { kill -9 \"$pid\" 2> /dev/null; wait \"$pid\" 2> /dev/null; }; [ $r = 0 ] || { cat \"$t/out.log\" >&2; echo \"classic: ${c1:-} / ${c2:-}; worker: ${w1:-} / ${w2:-}\" >&2; } 2> /dev/null; rm -rf -- \"${t:?}\"; [ $r = 0 ] && echo \"FrankenPHP 1.13.1 on PHP 8.5.12 ZTS (Caddy's standard modules and FrankenPHP's, no Mercure, Vulcain or Brotli): php-cli ran PHP with intl; as uid 65534, a PHP file in classic mode answered two requests each from a fresh script, and a worker script answered two requests from one boot, its counter at 1 and then 2; SIGTERM ended it with status 0, and then the port refused\"; exit $r" }