Category
Foundation: · dependency management (the failure class behind #36209 and the August php-cfg-bare-variable-read-stmt.patch outage) · child of #36188
Problem
Measured on master 4eed6a2785:
|
|
| patches |
183 files, 5,495 diff lines (avg 30); 8 contain zero hunks (e.g. php-cfg-instanceof-union.patch is one comment line) |
script/apply-patches.sh |
7,508 lines — 37 % larger than every patch combined; 85 hand-written overlay functions (bash/sed/python) bypass patch(1) entirely (40 dispatch branches at :6680-7010); 412 grep -q idempotency guards |
| audit vs the current vendor tree |
3 apply cleanly, 88 reverse cleanly, 92 (50 %) neither |
| concentration |
PHPCfg/Parser.php 50, PHPTypes/InternalArgInfo.php 35, TypeReconstructor.php 22, Type.php 22 — 129 of 183 touch four files |
| categories |
php-cfg 78 (feature backports: enums, match, readonly, hooks…), php-types 76 (mostly arginfo data + docblock parsing), php-llvm 25 (binding fixes), parser/pre 4 |
The per-patch grep guard means a patch can be "applied" by marker while its hunks would fail or duplicate: php-llvm-structgep-assert.patch today applies hunk 1 with fuzz 2 and fails hunk 2 while both edits are already present — a non-dry-run would have duplicated the assert. Every fresh composer install (CI, a new box, a worktree) is a roll of the dice, and the .patch files cannot be reviewed as the change they claim to be.
PHP implementation target
Done when
Category
Foundation:· dependency management (the failure class behind #36209 and the Augustphp-cfg-bare-variable-read-stmt.patchoutage) · child of #36188Problem
Measured on master
4eed6a2785:php-cfg-instanceof-union.patchis one comment line)script/apply-patches.shpatch(1)entirely (40 dispatch branches at :6680-7010); 412grep -qidempotency guardsPHPCfg/Parser.php50,PHPTypes/InternalArgInfo.php35,TypeReconstructor.php22,Type.php22 — 129 of 183 touch four filesThe per-patch
grepguard means a patch can be "applied" by marker while its hunks would fail or duplicate:php-llvm-structgep-assert.patchtoday applies hunk 1 with fuzz 2 and fails hunk 2 while both edits are already present — a non-dry-run would have duplicated the assert. Every freshcomposer install(CI, a new box, a worktree) is a roll of the dice, and the.patchfiles cannot be reviewed as the change they claim to be.PHP implementation target
ircmaxell/php-cfgandircmaxell/php-typestoPurHur/php-cfg/PurHur/php-types(MIT), land every overlay and patch as reviewed commits with tests, consume via composer VCS repositories pinned to tags; theprelinked/bootstrap-vendor/sources/copies follow the same tags. Keeppatches/for php-llvm only (25 files) with per-hunk markers and--no-fuzz.apply-patches.sh --verify-pristinein CI (from CI: all four workflows have been red on master since 2026-09-01 07:59 because php-llvm-structgep-assert.patch has fictional context and apply-patches.sh skips instead of verifying — setup failures are swallowed locally (patches/, script/apply-patches.sh, script/ci-memory-env.sh) (re-#36143) #36209),--no-fuzzon everypatch(1)call, delete the 8 empty patches, fail loudly on partial application.docs/vendor-patches.mdgenerated: one row per divergence from upstream with the reason and the upstream issue/PR if any (several are candidates to upstream).Done when
composer install --ignore-platform-reqs && script/apply-patches.shon a clean checkout is deterministic;apply-patches.sh< 1,500 lines; zero overlay functions for php-cfg/php-typesgit apply --checkclean for every remaining patch under--verify-pristine; the compliance/differential name-sets unchanged after the switchmake bootstrap-vendor-objects) re-provedobject_okagainst the forked sources