[doc-en] master: enchant_broker_*: document the ValueError and fix the return values (#5989)
| From: | qodelicious via GitHub | Date: | Thu, 22 Oct 2026 07:18:28 +0000 |
| Subject: | [doc-en] master: enchant_broker_*: document the ValueError and fix the return values (#5989) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23871@lists.php.net to get a copy of this message | ||
Author: qodelicious (qodelicious)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-22T09:18:25+02:00
Commit: https://github.com/php/doc-en/commit/aac1b12d060edef115c999d0c3d5072ede8ec2bd
Raw diff: https://github.com/php/doc-en/commit/aac1b12d060edef115c999d0c3d5072ede8ec2bd.diff
enchant_broker_*: document the ValueError and fix the return values (#5989)
* enchant_broker_*: document the ValueError and fix the return values
* enchant: drop the ValueError from the dict path functions and sort the entities
Changed paths:
M reference/enchant/entities.ent
M reference/enchant/functions/enchant-broker-describe.xml
M reference/enchant/functions/enchant-broker-dict-exists.xml
M reference/enchant/functions/enchant-broker-free-dict.xml
M reference/enchant/functions/enchant-broker-free.xml
M reference/enchant/functions/enchant-broker-get-error.xml
M reference/enchant/functions/enchant-broker-init.xml
M reference/enchant/functions/enchant-broker-list-dicts.xml
M reference/enchant/functions/enchant-broker-request-dict.xml
M reference/enchant/functions/enchant-broker-request-pwl-dict.xml
M reference/enchant/functions/enchant-broker-set-ordering.xml
Diff:
diff --git a/reference/enchant/entities.ent b/reference/enchant/entities.ent
index 4c68badd1b7a..68c8c2c207d8 100644
--- a/reference/enchant/entities.ent
+++ b/reference/enchant/entities.ent
@@ -9,6 +9,15 @@
xmlns:xlink = "http://www.w3.org/1999/xlink"
translate = "yes">
+<entity name="ext.enchant.broker-valueerror">
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>broker</parameter> is not usable, for example if it is
+ uninitialized or was already freed with
+ <function>enchant_broker_free</function>.
+ </simpara>
+</entity>
+
<entity name="ext.enchant.dict-valueerror">
<simpara>
Throws a <exceptionname>ValueError</exceptionname> if
diff --git a/reference/enchant/functions/enchant-broker-describe.xml
b/reference/enchant/functions/enchant-broker-describe.xml
index 57ba8f143619..376ffc6f10b5 100644
--- a/reference/enchant/functions/enchant-broker-describe.xml
+++ b/reference/enchant/functions/enchant-broker-describe.xml
@@ -31,6 +31,11 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-dict-exists.xml
b/reference/enchant/functions/enchant-broker-dict-exists.xml
index 18cb9316554a..6926b37c9ce0 100644
--- a/reference/enchant/functions/enchant-broker-dict-exists.xml
+++ b/reference/enchant/functions/enchant-broker-dict-exists.xml
@@ -38,6 +38,15 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>tag</parameter> is empty.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -49,6 +58,13 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>tag</parameter> is empty.
+ </entry>
+ </row>
&enchant.changelog.broker-param;
</tbody>
</tgroup>
diff --git a/reference/enchant/functions/enchant-broker-free-dict.xml
b/reference/enchant/functions/enchant-broker-free-dict.xml
index f0defac2d7dc..a391188758e8 100644
--- a/reference/enchant/functions/enchant-broker-free-dict.xml
+++ b/reference/enchant/functions/enchant-broker-free-dict.xml
@@ -36,6 +36,11 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.dict-valueerror;
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-free.xml
b/reference/enchant/functions/enchant-broker-free.xml
index ce2393b7cad0..9e313c0feade 100644
--- a/reference/enchant/functions/enchant-broker-free.xml
+++ b/reference/enchant/functions/enchant-broker-free.xml
@@ -37,6 +37,15 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ <simpara>
+ Throws an <exceptionname>Error</exceptionname> if
+ <parameter>broker</parameter> still has open dictionaries.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-get-error.xml
b/reference/enchant/functions/enchant-broker-get-error.xml
index fe5aeca667ce..a23d840968b3 100644
--- a/reference/enchant/functions/enchant-broker-get-error.xml
+++ b/reference/enchant/functions/enchant-broker-get-error.xml
@@ -29,6 +29,11 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-init.xml
b/reference/enchant/functions/enchant-broker-init.xml
index c57c167df3f9..f6050fff2383 100644
--- a/reference/enchant/functions/enchant-broker-init.xml
+++ b/reference/enchant/functions/enchant-broker-init.xml
@@ -21,7 +21,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
- Returns a broker resource on success or &false;.
+ Returns an <classname>EnchantBroker</classname> instance on
+ success&return.falseforfailure;.
</simpara>
</refsect1>
diff --git a/reference/enchant/functions/enchant-broker-list-dicts.xml
b/reference/enchant/functions/enchant-broker-list-dicts.xml
index 648f79d1e4e3..6e2a0edb5d56 100644
--- a/reference/enchant/functions/enchant-broker-list-dicts.xml
+++ b/reference/enchant/functions/enchant-broker-list-dicts.xml
@@ -30,6 +30,11 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-request-dict.xml
b/reference/enchant/functions/enchant-broker-request-dict.xml
index e101ea6fb828..f512ad0f8779 100644
--- a/reference/enchant/functions/enchant-broker-request-dict.xml
+++ b/reference/enchant/functions/enchant-broker-request-dict.xml
@@ -35,7 +35,17 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
- Returns a dictionary resource on success&return.falseforfailure;.
+ Returns an <classname>EnchantDictionary</classname> instance on
+ success&return.falseforfailure;.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>tag</parameter> is empty.
</simpara>
</refsect1>
diff --git a/reference/enchant/functions/enchant-broker-request-pwl-dict.xml
b/reference/enchant/functions/enchant-broker-request-pwl-dict.xml
index 0bb1ea182807..f17f106d98cd 100644
--- a/reference/enchant/functions/enchant-broker-request-pwl-dict.xml
+++ b/reference/enchant/functions/enchant-broker-request-pwl-dict.xml
@@ -36,10 +36,16 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
- Returns a dictionary resource on success&return.falseforfailure;.
+ Returns an <classname>EnchantDictionary</classname> instance on
+ success&return.falseforfailure;.
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
diff --git a/reference/enchant/functions/enchant-broker-set-ordering.xml
b/reference/enchant/functions/enchant-broker-set-ordering.xml
index f95ee0420416..babbe55be29b 100644
--- a/reference/enchant/functions/enchant-broker-set-ordering.xml
+++ b/reference/enchant/functions/enchant-broker-set-ordering.xml
@@ -53,6 +53,15 @@
</simpara>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ &ext.enchant.broker-valueerror;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>tag</parameter> or <parameter>ordering</parameter> is empty.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -64,6 +73,13 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
+ <parameter>tag</parameter> or <parameter>ordering</parameter> is
empty.
+ </entry>
+ </row>
&enchant.changelog.broker-param;
</tbody>
</tgroup>