[php-src] master: Merge branch 'PHP-8.6'
| From: | Máté Kocsis | Date: | Sat, 21 Nov 2026 21:53:17 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144008@lists.php.net to get a copy of this message | ||
Author: Máté Kocsis (kocsismate)
Date: 2026-11-21T22:53:04+01:00
Commit: https://github.com/php/php-src/commit/495a43d41786f3fd664921469ed038495ea46cf6
Raw diff: https://github.com/php/php-src/commit/495a43d41786f3fd664921469ed038495ea46cf6.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
gen_stub: do not add xi:fallback to generated xi:include elements (#25533)
Changed paths:
M build/gen_stub.php
Diff:
diff --git a/build/gen_stub.php b/build/gen_stub.php
index 137552977f59..c67f8ee97234 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -3981,8 +3981,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap,
array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation
"));
$includeElement = $this->createIncludeElement(
$doc,
- "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])",
- $classSynopsisIndentationLevel + 1
+ "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
@@ -3991,8 +3990,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap,
array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation
"));
$includeElement = $this->createIncludeElement(
$doc,
- "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])",
- $classSynopsisIndentationLevel + 1
+ "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
@@ -4001,8 +3999,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap,
array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation
"));
$includeElement = $this->createIncludeElement(
$doc,
- "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])",
- $classSynopsisIndentationLevel + 1
+ "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
@@ -4025,8 +4022,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap,
array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation
"));
$includeElement = $this->createIncludeElement(
$doc,
- "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:{$parentMethodsynopsisType}[@role='$escapedParentName'])",
- $classSynopsisIndentationLevel + 1
+ "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:{$parentMethodsynopsisType}[@role='$escapedParentName'])"
);
$classSynopsis->appendChild($includeElement);
@@ -4252,18 +4248,12 @@ public function getClassName(): string {
return $this->name->getLast();
}
- private function createIncludeElement(DOMDocument $doc, string $query, int $indentationLevel):
DOMElement
+ private function createIncludeElement(DOMDocument $doc, string $query): DOMElement
{
- $indentation = str_repeat(" ", $indentationLevel);
-
$includeElement = $doc->createElement("xi:include");
$attr = $doc->createAttribute("xpointer");
$attr->value = $query;
$includeElement->appendChild($attr);
- $fallbackElement = $doc->createElement("xi:fallback");
- $includeElement->appendChild(new DOMText("\n$indentation "));
- $includeElement->appendChild($fallbackElement);
- $includeElement->appendChild(new DOMText("\n$indentation"));
return $includeElement;
}
@@ -4294,11 +4284,11 @@ private function appendInheritedMemberSectionToClassSynopsis(DOMDocument
$doc, D
foreach ($parents as $parent) {
$classSynopsis->appendChild(new DOMText("\n$indentation"));
$parentReference = self::getClassSynopsisReference($parent);
+ $parentSynopsis = count($parent->getParts()) > 1
?"db:packagesynopsis/db:classsynopsis" : "db:classsynopsis";
$includeElement = $this->createIncludeElement(
$doc,
- "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$parentReference')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment'
and text()='$label']]))",
- $indentationLevel
+ "xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('$parentReference')/db:partintro/db:section/$parentSynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment'
and text()='$label']]))"
);
$classSynopsis->appendChild($includeElement);
}