From b8f2c0cffa078980548743815c82fddd44905f3d Mon Sep 17 00:00:00 2001 From: Jordi Kroon Date: Sat, 28 Nov 2026 20:49:42 +0100 Subject: [PATCH 1/2] Skip non-refentry documents and manual synopses in stub generation --- build/gen_stub.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/gen_stub.php b/build/gen_stub.php index 763b82bc2301..6a2ea1977f5d 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -6138,6 +6138,11 @@ function replaceMethodSynopses( continue; } + // Only function and method pages are regenerated + if ($doc->documentElement->nodeName !== "refentry") { + continue; + } + $methodSynopsisElements = []; foreach ($doc->getElementsByTagName("constructorsynopsis") as $element) { $methodSynopsisElements[] = $element; @@ -6166,6 +6171,11 @@ function replaceMethodSynopses( $funcInfo = $funcMap[$funcName]; $documentedFuncMap[$funcInfo->name->__toString()] = $funcInfo->name->__toString(); + // Hand-maintained synopses are never regenerated + if ($methodSynopsis->getAttribute("condition") === "manual") { + continue; + } + $newMethodSynopsis = $funcInfo->getMethodSynopsisElement($doc); if ($newMethodSynopsis === null) { continue; From 7c9c6d14ffe1d599bdc0c835aa5340f9ff35c4f4 Mon Sep 17 00:00:00 2001 From: Jordi Kroon Date: Sat, 28 Nov 2026 21:13:04 +0100 Subject: [PATCH 2/2] use stub-override as condition value --- build/gen_stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 6a2ea1977f5d..f40872daabaf 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -6172,7 +6172,7 @@ function replaceMethodSynopses( $documentedFuncMap[$funcInfo->name->__toString()] = $funcInfo->name->__toString(); // Hand-maintained synopses are never regenerated - if ($methodSynopsis->getAttribute("condition") === "manual") { + if ($methodSynopsis->getAttribute("condition") === "stub-override") { continue; }