Category
bootstrap | language
Problem
When patches/php-cfg-list-spread.patch (overlay via script/apply-patches.sh) is not applied, every assignment through PHPCfg Op\Expr\Assign emits PHP warnings:
Undefined property: PHPCfg\Op\Expr\Assign::$listSpreadRhs in lib/Compiler.php
List destructuring with spread (#4835, #4889) was implemented assuming the overlay property exists. lib/Compiler.php reads $op->listSpreadRhs at lines ~1238, ~1381, ~4250, ~4254 without guarding property_exists().
Workers see noisy logs on any script; bootstrap/self-host compiles are especially noisy (dozens of warnings per file).
php-src reference
- php/php-src
Zend/zend_compile.c — list destructuring spread lowering
- Overlay:
patches/php-cfg-list-spread.patch (apply_php_cfg_list_spread_overlay() in script/apply-patches.sh)
Repro (verified 2026-06-04)
A — warning count on trivial assign
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
cd /compiler
php bin/vm.php -r "\$a=1;" 2>&1 | grep -c listSpreadRhs || echo 0
'
| Patch state |
grep -c listSpreadRhs on \$a=1; |
After ./script/apply-patches.sh |
0 |
Fresh composer install without overlay |
≥4 (multiple compile paths) |
B — list spread still compiles when patch applied
<?php
[$a, ...$rest] = [1, 2, 3];
var_export([$a, $rest]);
Scope (this repo)
| Module |
Path |
| Compiler |
lib/Compiler.php — property_exists($op, 'listSpreadRhs') before all reads |
| Bootstrap |
Ensure script/apply-patches.sh runs in Docker CI / composer install post-step (document if missing) |
| Tests |
test/unit/ or compliance: compile \$a=1; captures stderr without listSpreadRhs |
Do not add C runtime logic; patch overlay or PHP guard only.
Done when
Verification
./script/apply-patches.sh
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "\$a=1;" 2>&1 | grep listSpreadRhs && exit 1 || exit 0'
make bootstrap-selfhost-link # no listSpreadRhs noise in log
Related
Category
bootstrap|languageProblem
When
patches/php-cfg-list-spread.patch(overlay viascript/apply-patches.sh) is not applied, every assignment through PHPCfgOp\Expr\Assignemits PHP warnings:List destructuring with spread (#4835, #4889) was implemented assuming the overlay property exists.
lib/Compiler.phpreads$op->listSpreadRhsat lines ~1238, ~1381, ~4250, ~4254 without guardingproperty_exists().Workers see noisy logs on any script; bootstrap/self-host compiles are especially noisy (dozens of warnings per file).
php-src reference
Zend/zend_compile.c— list destructuring spread loweringpatches/php-cfg-list-spread.patch(apply_php_cfg_list_spread_overlay()inscript/apply-patches.sh)Repro (verified 2026-06-04)
A — warning count on trivial assign
grep -c listSpreadRhson\$a=1;./script/apply-patches.sh0composer installwithout overlay≥4(multiple compile paths)B — list spread still compiles when patch applied
Scope (this repo)
lib/Compiler.php—property_exists($op, 'listSpreadRhs')before all readsscript/apply-patches.shruns in Docker CI /composer installpost-step (document if missing)test/unit/or compliance: compile\$a=1;captures stderr withoutlistSpreadRhsDo not add C runtime logic; patch overlay or PHP guard only.
Done when
0warnings with and without vendor patch (guard path)php script/bootstrap-inventory.php --check/ self-host compile oflib/Compiler.phpno longer spams warnings./script/ci-fast.sh --filter Compileror targeted unit greenVerification
Related