diff --git a/build/gen_stub.php b/build/gen_stub.php index 763b82bc2301..f40872daabaf 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") === "stub-override") { + continue; + } + $newMethodSynopsis = $funcInfo->getMethodSynopsisElement($doc); if ($newMethodSynopsis === null) { continue;