From 589797fe0306f44ee22793de8e76beb9d6cfccfa Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 8 Aug 2026 11:32:48 +0000 Subject: [PATCH 1/2] feat(ci): run the test suite on macOS (darwin x64 + arm64) z-engine now ships darwin-{x64,arm64}-nts definitions on its 8.4 branch (lisachenko/z-engine#58), so the integration guards widen from Linux-only to Linux+Darwin and CI gains macos-latest (arm64) and macos-15-intel (x64) legs on PHP 8.4. The 8.5 line stays Linux-only until z-engine master grows darwin artifacts. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0188iU6pEvBQgtjPTXEdzHwj --- .github/workflows/ci.yml | 13 ++++++++++--- AGENTS.md | 2 +- README.md | 2 +- tests/Integration/DbgpIntegrationTestCase.php | 4 ++-- tests/Integration/ModuleRegistrationTest.php | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de19089..6b0b606 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,19 @@ on: jobs: tests: - name: Tests (PHP ${{ matrix.php }}) - runs-on: ubuntu-latest + name: Tests (PHP ${{ matrix.php }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - php: ['8.4', '8.5'] + include: + - { os: ubuntu-latest, php: '8.4' } + - { os: ubuntu-latest, php: '8.5' } + # macOS runs PHP 8.4 only: z-engine ships darwin definitions on its + # 8.4 branch (lisachenko/z-engine#58); the 8.5 line has none yet. + # macos-latest is arm64, macos-15-intel is x64 - both darwin arches. + - { os: macos-latest, php: '8.4' } + - { os: macos-15-intel, php: '8.4' } steps: - uses: actions/checkout@v4 diff --git a/AGENTS.md b/AGENTS.md index 07e03f3..bf485bc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ on PHP 8.5) and Composer resolves the matching one for the running PHP. ## Environment requirements -- PHP `^8.4` (8.4 and 8.5 are tested in CI), **NTS, linux-x64** (the only platform z-engine ships definitions for). +- PHP `^8.4` (8.4 and 8.5 are tested in CI), **NTS, linux-x64 or darwin-x64/arm64** (the platforms z-engine ships definitions for; darwin on the 8.4 line only for now). - `ffi.enable=1` and **JIT off** (`opcache.jit=off`) — the JIT rewrites the executor internals the statement hook plugs into. Both must come from `php.ini`/`-d`. - The debuggee's code must be compiled **after** the debugger initializes; the diff --git a/README.md b/README.md index a3b57e8..cc1c821 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Precedence, lowest to highest: built-in defaults → Xdebug ini/env → `ZDEBUG_ ## Requirements -- PHP **8.4 or 8.5** (supported in parallel), **NTS**, **linux-x64** (z-engine ships definitions for that platform); Composer resolves the matching z-engine line per minor +- PHP **8.4 or 8.5** (supported in parallel), **NTS**, **linux-x64 or macOS x64/arm64** (platforms z-engine ships definitions for; macOS on PHP 8.4 for now); Composer resolves the matching z-engine line per minor - `ffi.enable=1` and **`opcache.jit=off`** (the JIT rewrites the executor internals the hook plugs into) - Your app's code must load **after** zdebug attaches — `auto_prepend_file` guarantees this diff --git a/tests/Integration/DbgpIntegrationTestCase.php b/tests/Integration/DbgpIntegrationTestCase.php index 31fcb7a..105d2a3 100644 --- a/tests/Integration/DbgpIntegrationTestCase.php +++ b/tests/Integration/DbgpIntegrationTestCase.php @@ -36,8 +36,8 @@ protected function setUp(): void if (!extension_loaded('ffi')) { $this->markTestSkipped('ext-ffi is required for the integration session'); } - if (PHP_OS_FAMILY !== 'Linux' || PHP_INT_SIZE !== 8) { - $this->markTestSkipped('z-engine ships definitions for linux-x64 only'); + if (!in_array(PHP_OS_FAMILY, ['Linux', 'Darwin'], true) || PHP_INT_SIZE !== 8) { + $this->markTestSkipped('z-engine ships definitions for 64-bit Linux and macOS only'); } } diff --git a/tests/Integration/ModuleRegistrationTest.php b/tests/Integration/ModuleRegistrationTest.php index 357348a..cfd0006 100644 --- a/tests/Integration/ModuleRegistrationTest.php +++ b/tests/Integration/ModuleRegistrationTest.php @@ -28,8 +28,8 @@ protected function setUp(): void if (!extension_loaded('ffi')) { $this->markTestSkipped('ext-ffi is required to register a runtime module'); } - if (PHP_OS_FAMILY !== 'Linux' || PHP_INT_SIZE !== 8) { - $this->markTestSkipped('z-engine ships definitions for linux-x64 only'); + if (!in_array(PHP_OS_FAMILY, ['Linux', 'Darwin'], true) || PHP_INT_SIZE !== 8) { + $this->markTestSkipped('z-engine ships definitions for 64-bit Linux and macOS only'); } } From a2c56ae5ff862f45fddd71c99b0ad326c6633877 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 8 Aug 2026 14:09:20 +0000 Subject: [PATCH 2/2] ci: run macOS legs on PHP 8.5 too z-engine master now ships darwin definitions for the 8.5 line (lisachenko/z-engine#58), so the macOS matrix legs cover both PHP minors like the Linux ones, and the "8.4 only for now" caveats come out of the docs. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0188iU6pEvBQgtjPTXEdzHwj --- .github/workflows/ci.yml | 8 +++++--- AGENTS.md | 2 +- README.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b0b606..ff609a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,13 @@ jobs: include: - { os: ubuntu-latest, php: '8.4' } - { os: ubuntu-latest, php: '8.5' } - # macOS runs PHP 8.4 only: z-engine ships darwin definitions on its - # 8.4 branch (lisachenko/z-engine#58); the 8.5 line has none yet. - # macos-latest is arm64, macos-15-intel is x64 - both darwin arches. + # z-engine ships darwin (x64 + arm64) definitions for both the 8.4 + # and 8.5 lines (lisachenko/z-engine#58), so macOS runs the full PHP + # matrix. macos-latest is arm64, macos-15-intel is x64. - { os: macos-latest, php: '8.4' } + - { os: macos-latest, php: '8.5' } - { os: macos-15-intel, php: '8.4' } + - { os: macos-15-intel, php: '8.5' } steps: - uses: actions/checkout@v4 diff --git a/AGENTS.md b/AGENTS.md index bf485bc..e1a052b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ on PHP 8.5) and Composer resolves the matching one for the running PHP. ## Environment requirements -- PHP `^8.4` (8.4 and 8.5 are tested in CI), **NTS, linux-x64 or darwin-x64/arm64** (the platforms z-engine ships definitions for; darwin on the 8.4 line only for now). +- PHP `^8.4` (8.4 and 8.5 are tested in CI), **NTS, linux-x64 or darwin-x64/arm64** (the platforms z-engine ships definitions for). - `ffi.enable=1` and **JIT off** (`opcache.jit=off`) — the JIT rewrites the executor internals the statement hook plugs into. Both must come from `php.ini`/`-d`. - The debuggee's code must be compiled **after** the debugger initializes; the diff --git a/README.md b/README.md index cc1c821..bc77c6c 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Precedence, lowest to highest: built-in defaults → Xdebug ini/env → `ZDEBUG_ ## Requirements -- PHP **8.4 or 8.5** (supported in parallel), **NTS**, **linux-x64 or macOS x64/arm64** (platforms z-engine ships definitions for; macOS on PHP 8.4 for now); Composer resolves the matching z-engine line per minor +- PHP **8.4 or 8.5** (supported in parallel), **NTS**, **linux-x64 or macOS x64/arm64** (platforms z-engine ships definitions for); Composer resolves the matching z-engine line per minor - `ffi.enable=1` and **`opcache.jit=off`** (the JIT rewrites the executor internals the hook plugs into) - Your app's code must load **after** zdebug attaches — `auto_prepend_file` guarantees this