Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions spikes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down