[doc-en] master: Fix various class method signatures to match stub (#5360)

From: Date: Wed, 03 Jun 2026 17:56:53 +0000
Subject: [doc-en] master: Fix various class method signatures to match stub (#5360)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23343@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-06-03T19:56:50+02:00 Commit: https://github.com/php/doc-en/commit/8a910daad2efdfd29acf6766be8bca7c32c3dd2a Raw diff: https://github.com/php/doc-en/commit/8a910daad2efdfd29acf6766be8bca7c32c3dd2a.diff Fix various class method signatures to match stub (#5360) * Fix 5 class method signatures to match php-src stubs - PDOStatement::setFetchMode: bool -> true - Phar::setStub: bool -> true - PharData::setStub: bool -> true, $len -> $length - ReflectionClass::getStaticPropertyValue: $def_value -> $default - IntlBreakIterator::getPartsIterator: param type string -> int * Use explicit 8.4.0 changelog rows instead of &return.type.true; (which is 8.2.0) * Address review feedback - IntlBreakIterator::getPartsIterator: revert param type to string; the int change in php-src (master only) is not backported to PHP-8.4/8.5, so documented versions must keep string. - Factor the 8.4.0 "return type true" changelog row into a new shared entity return.type.true.84, mirroring return.type.true. * Use simpara for return value paragraphs (style guide) Changed paths: M language-snippets.ent M reference/pdo/pdostatement/setfetchmode.xml M reference/phar/Phar/setStub.xml M reference/phar/PharData/setStub.xml M reference/reflection/reflectionclass/getstaticpropertyvalue.xml Diff: diff --git a/language-snippets.ent b/language-snippets.ent index 6f03b81a79fb..8ac978a3e502 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -852,6 +852,13 @@ searched for within the <link xmlns="http://docbook.org/ns/docbook" linkend="ini </entry> </row>'> +<!ENTITY return.type.true.84 '<row xmlns="http://docbook.org/ns/docbook"> + <entry>8.4.0</entry> + <entry> + The return type is &true; now; previously, it was <type>bool</type>. + </entry> +</row>'> + <!ENTITY return.falseforfailure ' or &false; on failure'> <!ENTITY return.falseforfailure.style.procedural '&style.procedural; returns &false; on failure.'> diff --git a/reference/pdo/pdostatement/setfetchmode.xml b/reference/pdo/pdostatement/setfetchmode.xml index 9cf0fa78a673..8c7354f4ad1e 100644 --- a/reference/pdo/pdostatement/setfetchmode.xml +++ b/reference/pdo/pdostatement/setfetchmode.xml @@ -11,25 +11,25 @@ &reftitle.description; <methodsynopsis role="PDOStatement"> - <modifier>public</modifier> <type>bool</type><methodname>PDOStatement::setFetchMode</methodname> + <modifier>public</modifier> <type>true</type><methodname>PDOStatement::setFetchMode</methodname> <methodparam><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <methodsynopsis role="PDOStatement"> - <modifier>public</modifier> <type>bool</type><methodname>PDOStatement::setFetchMode</methodname> + <modifier>public</modifier> <type>true</type><methodname>PDOStatement::setFetchMode</methodname> <methodparam><type>int</type><parameter>mode</parameter><initializer>PDO::FETCH_COLUMN</initializer></methodparam> <methodparam><type>int</type><parameter>colno</parameter></methodparam> </methodsynopsis> <methodsynopsis role="PDOStatement"> - <modifier>public</modifier> <type>bool</type><methodname>PDOStatement::setFetchMode</methodname> + <modifier>public</modifier> <type>true</type><methodname>PDOStatement::setFetchMode</methodname> <methodparam><type>int</type><parameter>mode</parameter><initializer>PDO::FETCH_CLASS</initializer></methodparam> <methodparam><type>string</type><parameter>class</parameter></methodparam> <methodparam><type class="union"><type>array</type><type>null</type></type><parameter>constructorArgs</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <methodsynopsis role="PDOStatement"> - <modifier>public</modifier> <type>bool</type><methodname>PDOStatement::setFetchMode</methodname> + <modifier>public</modifier> <type>true</type><methodname>PDOStatement::setFetchMode</methodname> <methodparam><type>int</type><parameter>mode</parameter><initializer>PDO::FETCH_INTO</initializer></methodparam> <methodparam><type>object</type><parameter>object</parameter></methodparam> </methodsynopsis> @@ -87,9 +87,26 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - &return.success; - </para> + <simpara> + &return.true.always; + </simpara> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &return.type.true.84; + </tbody> + </tgroup> + </informaltable> </refsect1> <refsect1 role="examples"> diff --git a/reference/phar/Phar/setStub.xml b/reference/phar/Phar/setStub.xml index c369e22b4d43..240d34dce6e6 100644 --- a/reference/phar/Phar/setStub.xml +++ b/reference/phar/Phar/setStub.xml @@ -8,7 +8,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis role="Phar"> - <modifier>public</modifier> <type>bool</type><methodname>Phar::setStub</methodname> + <modifier>public</modifier> <type>true</type><methodname>Phar::setStub</methodname> <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> @@ -71,9 +71,9 @@ include 'phar://myphar.phar/somefile.php'; <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - &return.success; - </para> + <simpara> + &return.true.always; + </simpara> </refsect1> <refsect1 role="errors"> @@ -98,6 +98,7 @@ include 'phar://myphar.phar/somefile.php'; </row> </thead> <tbody> + &return.type.true.84; <row> <entry>8.3.0</entry> <entry> diff --git a/reference/phar/PharData/setStub.xml b/reference/phar/PharData/setStub.xml index 8f5ffdd5376b..572169f50b43 100644 --- a/reference/phar/PharData/setStub.xml +++ b/reference/phar/PharData/setStub.xml @@ -8,9 +8,9 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis role="PharData"> - <modifier>public</modifier> <type>bool</type><methodname>PharData::setStub</methodname> + <modifier>public</modifier> <type>true</type><methodname>PharData::setStub</methodname> <methodparam><type>string</type><parameter>stub</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>len</parameter><initializer>-1</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>-1</initializer></methodparam> </methodsynopsis> @@ -34,7 +34,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> @@ -48,9 +48,9 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; - <para> - &return.success; - </para> + <simpara> + &return.true.always; + </simpara> </refsect1> <refsect1 role="errors"> @@ -60,6 +60,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &return.type.true.84; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> diff --git a/reference/reflection/reflectionclass/getstaticpropertyvalue.xml b/reference/reflection/reflectionclass/getstaticpropertyvalue.xml index e010b312cf7f..243d997e8e15 100644 --- a/reference/reflection/reflectionclass/getstaticpropertyvalue.xml +++ b/reference/reflection/reflectionclass/getstaticpropertyvalue.xml @@ -12,7 +12,7 @@ <methodsynopsis role="ReflectionClass"> <modifier>public</modifier> <type>mixed</type><methodname>ReflectionClass::getStaticPropertyValue</methodname> <methodparam><type>string</type><parameter>name</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter role="reference">def_value</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter role="reference">default</parameter></methodparam> </methodsynopsis> <para> Gets the value of a static property on this class. @@ -33,7 +33,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>def_value</parameter></term> + <term><parameter>default</parameter></term> <listitem> <para> A default value to return in case the class does not declare a static

« previous php.doc.cvs (#23343) next »