diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f278749..74c8637 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: permissions: contents: read -# z-engine tracks one PHP minor per release line; the "8.4.x-dev || 8.5.x-dev" +# z-engine tracks one PHP minor per release line; the "~8.4.2 || ~8.5.0" # constraint lets Composer resolve the line matching each runner's PHP, so the # suite runs on PHP 8.4 and 8.5 in parallel. jobs: diff --git a/AGENTS.md b/AGENTS.md index 67fdf4d..d86fddf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -311,7 +311,7 @@ in every process. ### z-engine's line must match the running PHP minor z-engine reads engine structures by byte offset and those offsets change on every PHP minor, so the -constraint is `8.4.x-dev || 8.5.x-dev` — Composer resolves the line matching the running PHP. +constraint is `~8.4.2 || ~8.5.0` — Composer resolves the stable line matching the running PHP. `ZEngine\Core::init()` enforces the exact match and refuses to boot on a mismatch. **Never loosen the constraint, skip `Core::init()`, or defeat the guard to make a failure go away.** A refusal is the guard working. diff --git a/README.md b/README.md index dab6052..be208e3 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,11 @@ fork-shared `mmap` arena and travel as addresses. composer require lisachenko/native-php-coroutines ``` -z-engine is required as `8.4.x-dev || 8.5.x-dev` — one development line per supported PHP minor, -resolved by Composer to match the running PHP — so a consuming project needs -`"minimum-stability": "dev"` with `"prefer-stable": true` at its root, as Composer only resolves -development stability there. +z-engine is required as `~8.4.2 || ~8.5.0` — one stable release line per supported PHP minor, +resolved by Composer to match the running PHP. `lisachenko/php-shared-data-extension` is still +consumed from `dev-main` (it has no tags yet), so this package keeps `"minimum-stability": "dev"` +with `"prefer-stable": true` at its root, and a consuming project needs the same pair until that +dependency is tagged — Composer only resolves development stability at the root level. ## Quick start @@ -528,8 +529,9 @@ z-engine requires it, and z-engine is a hard dependency of this package. - PHP **8.4** or **8.5**, NTS. - `ext-ffi` with `ffi.enable=1`, and `opcache.jit=off` — the JIT rewrites the executor internals the engine hooks depend on. -- `lisachenko/z-engine`, resolved per PHP minor (`8.4.x-dev` on 8.4, `8.5.x-dev` on 8.5) — engine - structures are read by byte offset, so the line must match the running minor. `ZEngine\Core::init()` +- `lisachenko/z-engine`, resolved per PHP minor (`8.4.x` on 8.4, `8.5.x` on 8.5, from the + `~8.4.2 || ~8.5.0` constraint) — engine structures are read by byte offset, so the line must + match the running minor. `ZEngine\Core::init()` enforces it and refuses to boot on a mismatch. - `ext-pcntl` and `ext-posix` for the parallel and preemption layers (suggested, not required). Preemption needs `ext-pcntl` specifically: the slice timer is delivered as `SIGALRM`. diff --git a/composer.json b/composer.json index f6de7b4..6b82f6f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "php": "^8.4", "ext-ffi": "*", "lisachenko/php-shared-data-extension": "dev-main", - "lisachenko/z-engine": "8.4.x-dev || 8.5.x-dev" + "lisachenko/z-engine": "~8.4.2 || ~8.5.0" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/spikes/README.md b/spikes/README.md index 09b0b6d..481a0fe 100644 --- a/spikes/README.md +++ b/spikes/README.md @@ -51,9 +51,7 @@ for v in 8.4:ze84 8.5:ze85; do php="php${v%%:*}"; dir="${v##*:}" mkdir -p "$dir" && (cd "$dir" \ && "$php" $(command -v composer) init -n --name=spikes/preemption \ - && "$php" $(command -v composer) config minimum-stability dev \ - && "$php" $(command -v composer) config prefer-stable true \ - && "$php" $(command -v composer) require lisachenko/z-engine:"8.4.x-dev || 8.5.x-dev" -n) + && "$php" $(command -v composer) require lisachenko/z-engine:"~8.4.2 || ~8.5.0" -n) done ```