Skip to content

Commit 9f822df

Browse files
committed
Document PHP 7.4 WASM limitation
1 parent fb7aee1 commit 9f822df

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/wasm-spike.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
fail-fast: false
2828
max-parallel: 1
2929
matrix:
30+
# The Rust WASM path uses ext-php-rs 0.15, which depends on PHP 8
31+
# Zend APIs. PHP 7.4 cannot be added here by extending the matrix.
3032
php: ['8.5', '8.4', '8.3', '8.2', '8.1', '8.0']
3133
async-mode: ['jspi']
3234

packages/php-ext-wp-mysql-parser/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ Load it for local test runs with:
3030
```bash
3131
php -d extension=/path/to/libwp_mysql_parser.so vendor/bin/phpunit
3232
```
33+
34+
## PHP.wasm side-module build
35+
36+
The experimental PHP.wasm side-module build lives in `wasm-spike/` and is
37+
verified in CI for PHP `8.0` through `8.5`.
38+
39+
PHP `7.4` is not supported by this Rust WASM path. The build uses
40+
`ext-php-rs` `0.15`, which depends on PHP 8 Zend APIs and does not compile
41+
against PHP `7.4` headers.

packages/php-ext-wp-mysql-parser/wasm-spike/RESULT.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ through Playground's compile-extension test harness and running a native lexer
99
smoke test. PHP 7.4 is outside this Rust path because `ext-php-rs` 0.15
1010
depends on PHP 8 Zend APIs and does not compile against PHP 7.4 headers.
1111

12+
## PHP version scope
13+
14+
This spike intentionally builds only PHP 8.0 through PHP 8.5. Adding PHP 7.4
15+
would require a different binding layer, or real PHP 7.4 support in
16+
`ext-php-rs`; it is not a workflow-only change. The failures are in the
17+
generated/wrapped Zend API surface itself, including PHP 8-only symbols and
18+
struct fields.
19+
1220
The build uses the upstream Playground compile-extension tooling for the
1321
phpize side-module build, static archive force-linking, wasm-opt pass, and
1422
manifest generation. The local glue that remains is Rust-specific: build

packages/php-ext-wp-mysql-parser/wasm-spike/build-in-docker-rust.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ case "$PHP_VERSION" in
3636
8.3) PHP_API_VERSION=20230831 ;;
3737
8.4) PHP_API_VERSION=20240924 ;;
3838
8.5) PHP_API_VERSION=20250925 ;;
39+
7.4)
40+
echo "Unsupported PHP_VERSION: 7.4" >&2
41+
echo "The WASM Rust build uses ext-php-rs 0.15, which depends on PHP 8 Zend APIs and does not compile against PHP 7.4 headers." >&2
42+
exit 1
43+
;;
3944
*)
40-
echo "Unsupported PHP_VERSION: $PHP_VERSION" >&2
45+
echo "Unsupported PHP_VERSION: $PHP_VERSION. Supported values: 8.0, 8.1, 8.2, 8.3, 8.4, 8.5." >&2
46+
echo "PHP 7.4 is outside this WASM Rust path because ext-php-rs 0.15 requires PHP 8 Zend APIs." >&2
4147
exit 1
4248
;;
4349
esac

0 commit comments

Comments
 (0)