[DOC-CVS] [doc-en] master: phar:setStub Change the parameter type to match stub (#5589)

[email protected] (Mikhail Alferov via GitHub) Thu, 4 Jun 2026 20:04:55 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Mikhail Alferov (mmalferov)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-06-04T22:04:52+02:00

Commit: https://github.com/php/doc-en/commit/4c394e560dac163a0be9098de27153a9f98ef490
Raw diff: https://github.com/php/doc-en/commit/4c394e560dac163a0be9098de27153a9f98ef490.diff

phar:setStub Change the parameter type to match stub (#5589)

It seems that it is better to specify the formal type `resource|string` for the `stub` parameter:

https://github.com/php/php-src/blob/21c2318e2952098a421e7fdff70c8fab9262686c/ext/phar/phar_object.stub.php#L479

Changed paths:
  M  reference/phar/PharData/setStub.xml


Diff:

diff --git a/reference/phar/PharData/setStub.xml b/reference/phar/PharData/setStub.xml
index 572169f50b43..e6ac8624c47a 100644
--- a/reference/phar/PharData/setStub.xml
+++ b/reference/phar/PharData/setStub.xml
@@ -9,7 +9,7 @@
   &reftitle.description;
   <methodsynopsis role="PharData">
    <modifier>public</modifier> <type>true</type><methodname>PharData::setStub</methodname>
-   <methodparam><type>string</type><parameter>stub</parameter></methodparam>
+   <methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>stub</parameter></methodparam>
    <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>-1</initializer></methodparam>
   </methodsynopsis>