Skip to content

Document some SPL changes in PHP-8.4 #4047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 36 additions & 17 deletions reference/spl/splfixedarray/setsize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SplFixedArray">
<modifier>public</modifier> <type>bool</type><methodname>SplFixedArray::setSize</methodname>
<modifier>public</modifier> <type>true</type><methodname>SplFixedArray::setSize</methodname>
<methodparam><type>int</type><parameter>size</parameter></methodparam>
</methodsynopsis>
<para>
Expand All @@ -35,26 +35,45 @@
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
<simpara>
&return.true.always;
</simpara>
</refsect1>


<refsect1 role="errors"><!-- {{{ -->

<refsect1 role="errors">
&reftitle.errors;
<para>
Throws <classname>InvalidArgumentException</classname> when <parameter>size</parameter> is less than zero.
</para>
<para>
Raises <constant>E_WARNING</constant> when <parameter>size</parameter> cannot be used as a number.
</para>
</refsect1><!-- }}} -->


<simpara>
Throws <exceptionname>ValueError</exceptionname> when
<parameter>size</parameter> is less than zero.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>SplFixedArray::setSize</methodname>
now has a tentative return of <type>true</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down
28 changes: 28 additions & 0 deletions reference/spl/splfixedarray/wakeup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<refpurpose>Reinitialises the array after being unserialised</refpurpose>
</refnamediv>

<refsynopsisdiv>
&warn.deprecated.function-8-4-0;
</refsynopsisdiv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SplFixedArray">
Expand All @@ -28,6 +32,30 @@
&return.void;
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
This method is now deprecated, use
<methodname>SplFixedArray::__unserialize</methodname>
instead.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
23 changes: 23 additions & 0 deletions reference/spl/splheap/insert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>SplHeap::insert</methodname>
now has a tentative return of <type>true</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
31 changes: 27 additions & 4 deletions reference/spl/splheap/recoverfromcorruption.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SplHeap">
<modifier>public</modifier> <type>bool</type><methodname>SplHeap::recoverFromCorruption</methodname>
<modifier>public</modifier> <type>true</type><methodname>SplHeap::recoverFromCorruption</methodname>
<void/>
</methodsynopsis>
</refsect1>
Expand All @@ -21,9 +21,32 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Always returns &true;.
</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>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>SplHeap::recoverFromCorruption</methodname>
now has a tentative return of <type>true</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

</refentry>
Expand Down
25 changes: 24 additions & 1 deletion reference/spl/splobjectstorage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</oointerface>

<oointerface>
<interfacename>Iterator</interfacename>
<interfacename>SeekableIterator</interfacename>
</oointerface>

<oointerface>
Expand Down Expand Up @@ -135,6 +135,29 @@ array(3) {
</section>
<!-- }}} -->

<section role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Implement <interfacename>SeekableIterator</interfacename>, previously
only <interfacename>Iterator</interfacename> was implemented.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>

</partintro>

&reference.spl.entities.splobjectstorage;
Expand Down
23 changes: 23 additions & 0 deletions reference/spl/splpriorityqueue/insert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>SplPriorityQueue::insert</methodname>
now has a tentative return of <type>true</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
31 changes: 27 additions & 4 deletions reference/spl/splpriorityqueue/recoverfromcorruption.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SplPriorityQueue">
<modifier>public</modifier> <type>bool</type><methodname>SplPriorityQueue::recoverFromCorruption</methodname>
<modifier>public</modifier> <type>true</type><methodname>SplPriorityQueue::recoverFromCorruption</methodname>
<void/>
</methodsynopsis>
</refsect1>
Expand All @@ -21,9 +21,32 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Always returns &true;.
</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>
<row>
<entry>8.4.0</entry>
<entry>
<methodname>SplPriorityQueue::recoverFromCorruption</methodname>
now has a tentative return of <type>true</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

</refentry>
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/versions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@
<function name="splfixedarray::__construct" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="splfixedarray::__serialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="splfixedarray::__unserialize" from="PHP 8 &gt;= 8.2.0"/>
<function name="splfixedarray::__wakeup" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8"/>
<function name="splfixedarray::__wakeup" from="PHP 5 &gt;= 5.5.0, PHP 7, PHP 8" deprecated="PHP 8 &gt;= 8.4.0"/>
<function name="splfixedarray::count" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="splfixedarray::toarray" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
<function name="splfixedarray::fromarray" from="PHP 5 &gt;= 5.3.0, PHP 7, PHP 8"/>
Expand Down