[DOC-CVS] [doc-en] master: SNMP: add changelog for PHP 8.5 ValueError validation (#5533)

[email protected] (Louis-Arnaud via GitHub) Mon, 4 May 2026 19:52:53 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-05-04T21:52:51+02:00

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

SNMP: add changelog for PHP 8.5 ValueError validation (#5533)

* SNMP: add changelog for PHP 8.5 ValueError validation

snmpget, snmpset, snmp2_get, snmp2_set, snmp3_get and snmp3_set now throw a
ValueError when the hostname is too large, contains any null byte, when the
port is negative or greater than 65535, or when the timeout or retries values
are lower than -1 or too large. This is documented in
appendices/migration85/incompatible.xml but the per-function changelog entries
were missing.

Co-authored-by: Jordi Kroon <[email protected]>

Changed paths:
  M  reference/snmp/functions/snmp2-get.xml
  M  reference/snmp/functions/snmp2-set.xml
  M  reference/snmp/functions/snmp3-get.xml
  M  reference/snmp/functions/snmp3-set.xml
  M  reference/snmp/functions/snmpget.xml
  M  reference/snmp/functions/snmpset.xml


Diff:

diff --git a/reference/snmp/functions/snmp2-get.xml b/reference/snmp/functions/snmp2-get.xml
index 037b4cfcbd72..f1911fc66e2a 100644
--- a/reference/snmp/functions/snmp2-get.xml
+++ b/reference/snmp/functions/snmp2-get.xml
@@ -76,6 +76,31 @@
   </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.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <example>
diff --git a/reference/snmp/functions/snmp2-set.xml b/reference/snmp/functions/snmp2-set.xml
index 3bed066017d7..8a30b22a8784 100644
--- a/reference/snmp/functions/snmp2-set.xml
+++ b/reference/snmp/functions/snmp2-set.xml
@@ -99,7 +99,30 @@
   </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.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
 
  <refsect1 role="examples">
   &reftitle.examples;
diff --git a/reference/snmp/functions/snmp3-get.xml b/reference/snmp/functions/snmp3-get.xml
index 02707b9a516f..763d563227fb 100644
--- a/reference/snmp/functions/snmp3-get.xml
+++ b/reference/snmp/functions/snmp3-get.xml
@@ -133,6 +133,15 @@
      </row>
     </thead>
     <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
      <row>
       <entry>8.1.0</entry>
       <entry>
diff --git a/reference/snmp/functions/snmp3-set.xml b/reference/snmp/functions/snmp3-set.xml
index e9036db85781..1d00077fb84f 100644
--- a/reference/snmp/functions/snmp3-set.xml
+++ b/reference/snmp/functions/snmp3-set.xml
@@ -147,6 +147,31 @@
   </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.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
    <example>
diff --git a/reference/snmp/functions/snmpget.xml b/reference/snmp/functions/snmpget.xml
index dfaabdf17c41..9bdd3f5068ca 100644
--- a/reference/snmp/functions/snmpget.xml
+++ b/reference/snmp/functions/snmpget.xml
@@ -76,6 +76,31 @@
   </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.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <example>
diff --git a/reference/snmp/functions/snmpset.xml b/reference/snmp/functions/snmpset.xml
index ed4c405a2062..f1424e59431c 100644
--- a/reference/snmp/functions/snmpset.xml
+++ b/reference/snmp/functions/snmpset.xml
@@ -100,6 +100,31 @@
   </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.5.0</entry>
+      <entry>
+       Now throws a <exceptionname>ValueError</exceptionname> when the hostname
+   length is equal to or greater than 128 bytes, when the port is
+       negative or greater than 65535, or when the timeout or retries values
+       are lower than -1 or too large.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
    <example>