[doc-en] master: stream: document the missing ValueErrors for a few stream functions (#6008)
| From: | qodelicious via GitHub | Date: | Fri, 23 Oct 2026 06:18:22 +0000 |
| Subject: | [doc-en] master: stream: document the missing ValueErrors for a few stream functions (#6008) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23879@lists.php.net to get a copy of this message | ||
Author: qodelicious (qodelicious)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-23T08:18:19+02:00
Commit: https://github.com/php/doc-en/commit/07a5133e064d915a81eef92a8f3021b717020932
Raw diff: https://github.com/php/doc-en/commit/07a5133e064d915a81eef92a8f3021b717020932.diff
stream: document the missing ValueErrors for a few stream functions (#6008)
Changed paths:
M reference/stream/functions/stream-get-contents.xml
M reference/stream/functions/stream-get-line.xml
M reference/stream/functions/stream-socket-enable-crypto.xml
M reference/stream/functions/stream-socket-recvfrom.xml
M reference/stream/functions/stream-socket-shutdown.xml
Diff:
diff --git a/reference/stream/functions/stream-get-contents.xml
b/reference/stream/functions/stream-get-contents.xml
index 2d0a4a6017b8..b98c0cb4f2ab 100644
--- a/reference/stream/functions/stream-get-contents.xml
+++ b/reference/stream/functions/stream-get-contents.xml
@@ -63,6 +63,13 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is less than <literal>-1</literal>.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -74,6 +81,13 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is less than <literal>-1</literal>.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
<row>
<entry>8.0.0</entry>
<entry>
diff --git a/reference/stream/functions/stream-get-line.xml
b/reference/stream/functions/stream-get-line.xml
index df48e1f8a9db..6dc0cef18203 100644
--- a/reference/stream/functions/stream-get-line.xml
+++ b/reference/stream/functions/stream-get-line.xml
@@ -71,6 +71,36 @@
pointed to by <parameter>stream</parameter>,&return.falseforfailure;.
</para>
</refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is negative.
+ </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.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is negative.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
diff --git a/reference/stream/functions/stream-socket-enable-crypto.xml
b/reference/stream/functions/stream-socket-enable-crypto.xml
index 18b6c076e2df..b6da72c743d0 100644
--- a/reference/stream/functions/stream-socket-enable-crypto.xml
+++ b/reference/stream/functions/stream-socket-enable-crypto.xml
@@ -101,6 +101,15 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>enable</parameter> is &true;,
+ <parameter>crypto_method</parameter> is omitted and the stream has no
+ <literal>crypto_method</literal> SSL context option.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -112,6 +121,14 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>crypto_method</parameter> is needed but
+ not given.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
<row>
<entry>8.0.0</entry>
<entry>
diff --git a/reference/stream/functions/stream-socket-recvfrom.xml
b/reference/stream/functions/stream-socket-recvfrom.xml
index 125ecc40f76b..0cd71ba41a70 100644
--- a/reference/stream/functions/stream-socket-recvfrom.xml
+++ b/reference/stream/functions/stream-socket-recvfrom.xml
@@ -91,6 +91,36 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is less than <literal>1</literal>.
+ </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.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>length</parameter> is less than <literal>1</literal>.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
diff --git a/reference/stream/functions/stream-socket-shutdown.xml
b/reference/stream/functions/stream-socket-shutdown.xml
index 405b7256ad38..9759c0cb8721 100644
--- a/reference/stream/functions/stream-socket-shutdown.xml
+++ b/reference/stream/functions/stream-socket-shutdown.xml
@@ -57,6 +57,38 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>mode</parameter> is not
+ <constant>STREAM_SHUT_RD</constant>, <constant>STREAM_SHUT_WR</constant>
+ or <constant>STREAM_SHUT_RDWR</constant>.
+ </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.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>mode</parameter> is invalid.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>