diff --git a/build/gen_stub.php b/build/gen_stub.php index 25933cccfa5..13e7c3af479 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -5779,6 +5779,19 @@ function replaceClassSynopses( continue; } $className = $child->textContent; + + if ($classSynopsis->parentElement->nodeName === "packagesynopsis" && + $classSynopsis->parentElement->firstElementChild->nodeName === "package" + ) { + $package = $classSynopsis->parentElement->firstElementChild; + $namespace = $package->textContent; + + $className = $namespace . "\\" . $className; + $elementToReplace = $classSynopsis->parentElement; + } else { + $elementToReplace = $classSynopsis; + } + if (!isset($classMap[$className])) { continue; } @@ -5794,7 +5807,7 @@ function replaceClassSynopses( // Check if there is any change - short circuit if there is not any. - if (replaceAndCompareXmls($doc, $classSynopsis, $newClassSynopsis)) { + if (replaceAndCompareXmls($doc, $elementToReplace, $newClassSynopsis)) { continue; }