Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/frankenphp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.11.3
Choose a base ref
...
head repository: php/frankenphp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.12.0
Choose a head ref
  • 17 commits
  • 88 files changed
  • 8 contributors

Commits on Feb 24, 2026

  1. Configuration menu
    Copy the full SHA
    0ae3386 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2026

  1. feat: Windows support (#2119)

    Closes #83 #880 #1286.
    
    Working patch for Windows support.
    
    Supports linking to the [official PHP release (TS
    version)](https://www.php.net/downloads.php).
    Includes some work from #1286 (thanks @TenHian!!)
    
    This patch allows using Visual Studio to compile the cgo code. To do so,
    it must be compiled with Go 1.26 (RC) with the following setup:
    
    ```powershell
    winget install -e --id Microsoft.VisualStudio.2022.Community --override "--passive --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.Llvm.Clang --includeRecommended"
    winget install -e --id GoLang.Go
    
    $env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin'
    
    cd c:\
    gh repo clone microsoft/vcpkg
    .\vcpkg\bootstrap-vcpkg.bat
    .\vcpkg\vcpkg install pthreads brotli
    
    # build watcher
    Invoke-WebRequest -Uri "https://github.com/e-dant/watcher/releases/download/0.14.3/x86_64-pc-windows-msvc.tar" -OutFile "$env:TEMP\watcher.tar"
    tar -xf "$env:TEMP\watcher.tar" -C C:\
    Rename-Item -Path "C:\x86_64-pc-windows-msvc" -NewName "watcher-x86_64-pc-windows-msvc"
    Remove-Item "$env:TEMP\watcher.tar"
    
    # download php
    Invoke-WebRequest -Uri "https://downloads.php.net/~windows/releases/archives/php-8.5.1-Win32-vs17-x64.zip" -OutFile "$env:TEMP\php.zip"
    Expand-Archive -Path "$env:TEMP\php.zip" -DestinationPath "C:\"
    Remove-Item "$env:TEMP\php.zip"
    
    # download php development package
    Invoke-WebRequest -Uri "https://downloads.php.net/~windows/releases/archives/php-devel-pack-8.5.1-Win32-vs17-x64.zip" -OutFile "$env:TEMP\php-devel.zip"
    Expand-Archive -Path "$env:TEMP\php-devel.zip" -DestinationPath "C:\"
    Remove-Item "$env:TEMP\php-devel.zip"
    
    $env:GOTOOLCHAIN = 'go1.26rc1'
    $env:CC = 'clang'
    $env:CXX = 'clang++'
    $env:CGO_CFLAGS = "-I$env:C:\vcpkg\installed\x64-windows\include -IC:\watcher-x86_64-pc-windows-msvc -IC:\php-8.5.1-devel-vs17-x64\include -IC:\php-8.5.1-devel-vs17-x64\include\main -IC:\php-8.5.1-devel-vs17-x64\include\TSRM -IC:\php-8.5.1-devel-vs17-x64\include\Zend -IC:\php-8.5.1-devel-vs17-x64\include\ext"
    $env:CGO_LDFLAGS = '-LC:\vcpkg\installed\x64-windows\lib -lbrotlienc -LC:\watcher-x86_64-pc-windows-msvc -llibwatcher-c -LC:\php-8.5.1-Win32-vs17-x64 -LC:\php-8.5.1-devel-vs17-x64\lib -lphp8ts -lphp8embed'
    
    # clone frankenphp and build
    git clone -b windows https://github.com/php/frankenphp.git
    cd frankenphp\caddy\frankenphp
    go build -ldflags '-extldflags="-fuse-ld=lld"' -tags nowatcher,nobadger,nomysql,nopgx
    
    # Tests
    
    $env:PATH += ";$env:VCPKG_ROOT\installed\x64-windows\bin;C:\watcher-x86_64-pc-windows-msvc";C:\php-8.5.1-Win32-vs17-x64"
    "opcache.enable=0`r`nopcache.enable_cli=0" | Out-File -Encoding ascii php.ini
    $env:PHPRC = Get-Location
    go test -ldflags '-extldflags="-fuse-ld=lld"' -tags nowatcher,nobadger,nomysql,nopgx .
    ```
    
    TODO:
    
    - [x] Fix remaining skipped tests (scaling and watcher)
    - [x] Test if the watcher mode works as expected
    - [x] Automate the build with GitHub Actions
    
    ---------
    
    Signed-off-by: Marc <[email protected]>
    Co-authored-by: Kévin Dunglas <[email protected]>
    Co-authored-by: DubbleClick <[email protected]>
    3 people authored Feb 26, 2026
    Configuration menu
    Copy the full SHA
    25ed020 View commit details
    Browse the repository at this point in the history
  2. perf: move sandboxed environment to the C side (#2058)

    This PR uses `zend_array_dup` to simplify and optimize the environment sandboxing
    logic. It also guarantees no environment leakage on FrankenPHP restarts.
    AlliBalliBaba authored Feb 26, 2026
    Configuration menu
    Copy the full SHA
    8f4412c View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2026

  1. docs: hardened image with Caddy environment vars (#2229)

    Adds `XDG_CONFIG_HOME` and `XDG_DATA_HOME` to the example hardened image
    docs, otherwise Caddy will fail to use the nonexistent /home directory
    instead of `/data/caddy` and `/config/caddy`.
    
    Also removes an unnecessary `--chown=nonroot:nonroot`.
    AlliBalliBaba authored Mar 2, 2026
    Configuration menu
    Copy the full SHA
    dcfdb2f View commit details
    Browse the repository at this point in the history
  2. feat: install script for Windows (#2228)

    Update the shell script and add a PowerShell script to install the
    Windows binary.
    
    ---------
    
    Co-authored-by: Kévin Dunglas <[email protected]>
    dunglas and dunglas authored Mar 2, 2026
    Configuration menu
    Copy the full SHA
    c2b8c8b View commit details
    Browse the repository at this point in the history
  3. fix(windows): ensure DLLs can always be located by PHP (#2227)

    Prevent crashes when `php.ini` references PHP extensions using relative
    paths, and FrankenPHP is started from a different working directory than
    the one containing extensions, or with `caddy start` (instead of `caddy
    run`).
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
    dunglas and claude authored Mar 2, 2026
    Configuration menu
    Copy the full SHA
    cda58d2 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2026

  1. Configuration menu
    Copy the full SHA
    8151c3a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db41496 View commit details
    Browse the repository at this point in the history
  3. docs: contributing on Windows (#2222)

    Signed-off-by: Kévin Dunglas <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    dunglas and Copilot authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    27ff6b4 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2026

  1. refactor: cleaner cgi string handling

    Introduces C-side interned string registry (frankenphp_strings) and a frankenphp_server_vars struct to bulk-register known $_SERVER variables with pre-sized hashtable capacity.
    AlliBalliBaba authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    356d2e1 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2026

  1. ci: fallback on static-php.dev mirror when php.net is down (#2233)

    Unfortunately, GitHub Actions is often blocked by the php.net CDN. This
    patch adds a fallback to use GitHub to try to determine the PHP version
    to use. This is less ideal because PHP currently doesn't use GitHub
    extensively, and distribution archives aren't available in the GitHub
    releases, only on php.net.
    dunglas authored Mar 5, 2026
    Configuration menu
    Copy the full SHA
    6268015 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    73c7b2e View commit details
    Browse the repository at this point in the history
  3. ci: deploy docs when they change (#2234)

    Signed-off-by: Kévin Dunglas <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    dunglas and Copilot authored Mar 5, 2026
    Configuration menu
    Copy the full SHA
    5d44741 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2026

  1. feat(caddy): configurable max_idle_time for autoscaled threads (#2225)

    Add configurable max_idle_time for autoscaled threads
    
    The idle timeout for autoscaled threads is currently hardcoded to 5
    seconds. With bursty traffic patterns, this causes threads to be
    deactivated too quickly, leading to repeated cold-start overhead when
    the next burst arrives.
    
    This PR replaces the hardcoded constant with a configurable
    max_idle_time directive, allowing users to tune how long idle
    autoscaled threads stay alive before deactivation. The default remains 5
    seconds, preserving existing behavior.
    
      Usage:
    
      Caddyfile:
    ````
      frankenphp {
          max_idle_time 30s
      }
    ````
      JSON config:
    ```
      {
          "frankenphp": {
              "max_idle_time": "30s"
          }
      }
    ````
    
      Changes:
      - New max_idle_time Caddyfile directive and JSON config option
      - New WithMaxIdleTime functional option
    - Replaced hardcoded maxThreadIdleTime constant with configurable
    maxIdleTime variable
      - Added tests for custom and default idle time behavior
      - Updated docs
    firecow authored Mar 6, 2026
    Configuration menu
    Copy the full SHA
    c099d66 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    87556c4 View commit details
    Browse the repository at this point in the history
  3. chore: bump deps

    dunglas committed Mar 6, 2026
    Configuration menu
    Copy the full SHA
    c2eb7a2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    74e8195 View commit details
    Browse the repository at this point in the history
Loading