From 58ba08b4b5d48d6cfcc5de84ba322efa6fe919eb Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 29 Oct 2024 20:38:49 +0300 Subject: [PATCH 1/3] [PHP 8.4] Add errors for GetText functions --- .../functions/bind-textdomain-codeset.xml | 15 +++++++++ reference/gettext/functions/dgettext.xml | 33 ++++++++++++++++++- reference/gettext/functions/dngettext.xml | 31 +++++++++++++++++ reference/gettext/functions/textdomain.xml | 31 +++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) diff --git a/reference/gettext/functions/bind-textdomain-codeset.xml b/reference/gettext/functions/bind-textdomain-codeset.xml index 997114e5355b..0249a0fcd4c9 100644 --- a/reference/gettext/functions/bind-textdomain-codeset.xml +++ b/reference/gettext/functions/bind-textdomain-codeset.xml @@ -52,6 +52,14 @@ + + &reftitle.errors; + + Throws a ValueError if domain + is the empty &string;. + + + &reftitle.changelog; @@ -63,6 +71,13 @@ + + 8.4.0 + + Now throws a ValueError if domain + is the empty &string;. + + 8.0.3 diff --git a/reference/gettext/functions/dgettext.xml b/reference/gettext/functions/dgettext.xml index 0d12c163df00..77047182d7cb 100644 --- a/reference/gettext/functions/dgettext.xml +++ b/reference/gettext/functions/dgettext.xml @@ -49,7 +49,38 @@ A string on success. - + + + &reftitle.errors; + + Throws a ValueError if domain + is the empty &string;. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.4.0 + + Now throws a ValueError if domain + is the empty &string;. + + + + + + + &reftitle.seealso; diff --git a/reference/gettext/functions/dngettext.xml b/reference/gettext/functions/dngettext.xml index 6e951d66551e..57d353654f93 100644 --- a/reference/gettext/functions/dngettext.xml +++ b/reference/gettext/functions/dngettext.xml @@ -65,6 +65,37 @@ + + &reftitle.errors; + + Throws a ValueError if domain + is the empty &string;. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.4.0 + + Now throws a ValueError if domain + is the empty &string;. + + + + + + + &reftitle.seealso; diff --git a/reference/gettext/functions/textdomain.xml b/reference/gettext/functions/textdomain.xml index f367cb06c87b..d55d7671498d 100644 --- a/reference/gettext/functions/textdomain.xml +++ b/reference/gettext/functions/textdomain.xml @@ -44,6 +44,37 @@ + + &reftitle.errors; + + Throws a ValueError if domain + is the empty &string;. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.4.0 + + Now throws a ValueError if domain + is the empty &string;. + + + + + + + &reftitle.notes; From ad926524d66062335e873754d5e49911680702b6 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 29 Oct 2024 22:45:21 +0300 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Gina Peter Banyard --- reference/gettext/functions/bind-textdomain-codeset.xml | 4 ++-- reference/gettext/functions/dgettext.xml | 4 ++-- reference/gettext/functions/dngettext.xml | 4 ++-- reference/gettext/functions/textdomain.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/reference/gettext/functions/bind-textdomain-codeset.xml b/reference/gettext/functions/bind-textdomain-codeset.xml index 0249a0fcd4c9..2fd99ba81dd7 100644 --- a/reference/gettext/functions/bind-textdomain-codeset.xml +++ b/reference/gettext/functions/bind-textdomain-codeset.xml @@ -55,7 +55,7 @@ &reftitle.errors; - Throws a ValueError if domain + Throws a ValueError if domain is the empty &string;. @@ -74,7 +74,7 @@ 8.4.0 - Now throws a ValueError if domain + Now throws a ValueError if domain is the empty &string;. diff --git a/reference/gettext/functions/dgettext.xml b/reference/gettext/functions/dgettext.xml index 77047182d7cb..99de771d201d 100644 --- a/reference/gettext/functions/dgettext.xml +++ b/reference/gettext/functions/dgettext.xml @@ -53,7 +53,7 @@ &reftitle.errors; - Throws a ValueError if domain + Throws a ValueError if domain is the empty &string;. @@ -72,7 +72,7 @@ 8.4.0 - Now throws a ValueError if domain + Now throws a ValueError if domain is the empty &string;. diff --git a/reference/gettext/functions/dngettext.xml b/reference/gettext/functions/dngettext.xml index 57d353654f93..4b2278fc747f 100644 --- a/reference/gettext/functions/dngettext.xml +++ b/reference/gettext/functions/dngettext.xml @@ -68,7 +68,7 @@ &reftitle.errors; - Throws a ValueError if domain + Throws a ValueError if domain is the empty &string;. @@ -87,7 +87,7 @@ 8.4.0 - Now throws a ValueError if domain + Now throws a ValueError if domain is the empty &string;. diff --git a/reference/gettext/functions/textdomain.xml b/reference/gettext/functions/textdomain.xml index d55d7671498d..0fd3484b5ca9 100644 --- a/reference/gettext/functions/textdomain.xml +++ b/reference/gettext/functions/textdomain.xml @@ -47,7 +47,7 @@ &reftitle.errors; - Throws a ValueError if domain + Throws a ValueError if domain is the empty &string;. @@ -66,7 +66,7 @@ 8.4.0 - Now throws a ValueError if domain + Now throws a ValueError if domain is the empty &string;. From f1e9460e2eb36075df54a9d39a863f2c9122c532 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 30 Oct 2024 10:15:58 +0300 Subject: [PATCH 3/3] type wording Co-authored-by: Christoph M. Becker --- reference/gettext/functions/bind-textdomain-codeset.xml | 4 ++-- reference/gettext/functions/dgettext.xml | 4 ++-- reference/gettext/functions/dngettext.xml | 4 ++-- reference/gettext/functions/textdomain.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/reference/gettext/functions/bind-textdomain-codeset.xml b/reference/gettext/functions/bind-textdomain-codeset.xml index 2fd99ba81dd7..34dbdf1437f9 100644 --- a/reference/gettext/functions/bind-textdomain-codeset.xml +++ b/reference/gettext/functions/bind-textdomain-codeset.xml @@ -56,7 +56,7 @@ &reftitle.errors; Throws a ValueError if domain - is the empty &string;. + is the empty string. @@ -75,7 +75,7 @@ 8.4.0 Now throws a ValueError if domain - is the empty &string;. + is the empty string. diff --git a/reference/gettext/functions/dgettext.xml b/reference/gettext/functions/dgettext.xml index 99de771d201d..b2706d742b0f 100644 --- a/reference/gettext/functions/dgettext.xml +++ b/reference/gettext/functions/dgettext.xml @@ -54,7 +54,7 @@ &reftitle.errors; Throws a ValueError if domain - is the empty &string;. + is the empty string. @@ -73,7 +73,7 @@ 8.4.0 Now throws a ValueError if domain - is the empty &string;. + is the empty string. diff --git a/reference/gettext/functions/dngettext.xml b/reference/gettext/functions/dngettext.xml index 4b2278fc747f..6e713a1d6a6c 100644 --- a/reference/gettext/functions/dngettext.xml +++ b/reference/gettext/functions/dngettext.xml @@ -69,7 +69,7 @@ &reftitle.errors; Throws a ValueError if domain - is the empty &string;. + is the empty string. @@ -88,7 +88,7 @@ 8.4.0 Now throws a ValueError if domain - is the empty &string;. + is the empty string. diff --git a/reference/gettext/functions/textdomain.xml b/reference/gettext/functions/textdomain.xml index 0fd3484b5ca9..959967bde78c 100644 --- a/reference/gettext/functions/textdomain.xml +++ b/reference/gettext/functions/textdomain.xml @@ -48,7 +48,7 @@ &reftitle.errors; Throws a ValueError if domain - is the empty &string;. + is the empty string. @@ -67,7 +67,7 @@ 8.4.0 Now throws a ValueError if domain - is the empty &string;. + is the empty string.