From 2a1a127c25f53700170692710bd9f12f8d85ee22 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sat, 13 Sep 2025 16:29:10 +0300 Subject: [PATCH 1/5] fix: Add missing translation --- system/Images/Handlers/ImageMagickHandler.php | 2 +- system/Language/en/Honeypot.php | 20 +++++++++++++++++++ system/Language/en/Router.php | 4 ++-- system/Language/en/Security.php | 3 ++- system/Language/en/Time.php | 1 + 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 system/Language/en/Honeypot.php diff --git a/system/Images/Handlers/ImageMagickHandler.php b/system/Images/Handlers/ImageMagickHandler.php index 233ea2d07149..bd2df0e49478 100644 --- a/system/Images/Handlers/ImageMagickHandler.php +++ b/system/Images/Handlers/ImageMagickHandler.php @@ -320,7 +320,7 @@ protected function supportedFormatCheck() switch ($this->image()->imageType) { case IMAGETYPE_WEBP: if (! in_array('WEBP', Imagick::queryFormats(), true)) { - throw ImageException::forInvalidImageCreate(lang('images.webpNotSupported')); + throw ImageException::forInvalidImageCreate(lang('Images.webpNotSupported')); } break; } diff --git a/system/Language/en/Honeypot.php b/system/Language/en/Honeypot.php new file mode 100644 index 000000000000..1e60387bc768 --- /dev/null +++ b/system/Language/en/Honeypot.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +// Honeypot language settings +return [ + 'noTemplate' => 'The HTML template for the Honeypot is not configured.', + 'noNameField' => 'The name of the Honeypot field has not been set.', + 'noHiddenValue' => 'The Honeypot should be invisible to humans.', + 'theClientIsABot' => 'The Honeypot client may be a bot.', +]; diff --git a/system/Language/en/Router.php b/system/Language/en/Router.php index 7bb55860198b..41748a66dda4 100644 --- a/system/Language/en/Router.php +++ b/system/Language/en/Router.php @@ -13,8 +13,8 @@ // Router language settings return [ - 'invalidParameter' => 'A parameter does not match the expected type.', + 'invalidParameterType' => 'A parameter does not match the expected type.', 'missingDefaultRoute' => 'Unable to determine what should be displayed. A default route has not been specified in the routing file.', 'invalidDynamicController' => 'A dynamic controller is not allowed for security reasons. Route handler: "{0}"', - 'invalidControllerName' => 'The namespace delimiter is a backslash (\), not a slash (/). Route handler: "{0}"', + 'invalidControllerName' => 'The namespace delimiter is a backslash (\\), not a slash (/). Route handler: "{0}"', ]; diff --git a/system/Language/en/Security.php b/system/Language/en/Security.php index fd906e378a29..1d99bad1ebd5 100644 --- a/system/Language/en/Security.php +++ b/system/Language/en/Security.php @@ -17,5 +17,6 @@ 'insecureCookie' => 'Attempted to send a secure cookie over a non-secure connection.', // @deprecated - 'invalidSameSite' => 'The SameSite value must be None, Lax, Strict, or a blank string. Given: "{0}"', + 'invalidSameSite' => 'The SameSite value must be None, Lax, Strict, or a blank string. Given: "{0}"', + 'invalidSameSiteSetting' => 'The SameSite setting must be None, Lax, Strict, or a blank string. Given: {0}', ]; diff --git a/system/Language/en/Time.php b/system/Language/en/Time.php index 2cb25218a1db..0f37b1812caf 100644 --- a/system/Language/en/Time.php +++ b/system/Language/en/Time.php @@ -32,4 +32,5 @@ 'yesterday' => 'Yesterday', 'tomorrow' => 'Tomorrow', 'now' => 'Just now', + 'invalidHour' => 'The supplied hour "{0}" is outside the range of allowed hours (1-24).', ]; From dfd73507cdf36b1ebdd8aa623bd59e90c1101361 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sat, 13 Sep 2025 16:31:01 +0300 Subject: [PATCH 2/5] docs: Update changelog --- user_guide_src/source/changelogs/v4.6.4.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user_guide_src/source/changelogs/v4.6.4.rst b/user_guide_src/source/changelogs/v4.6.4.rst index cc16d924fb03..6f7aa6932473 100644 --- a/user_guide_src/source/changelogs/v4.6.4.rst +++ b/user_guide_src/source/changelogs/v4.6.4.rst @@ -18,6 +18,11 @@ BREAKING Message Changes *************** +- Added ``Honeypot.noTemplate``, ``Honeypot.noNameField``, ``Honeypot.noHiddenValue``, ``Honeypot.theClientIsABot``. +- Added ``Time.invalidHour``. +- Changed ``Router.invalidParameter`` to ``Router.invalidParameterType``. +- Added deprecated ``Security.invalidSameSiteSetting``. + ******* Changes ******* From 4a49b9731dff8901099c9dbfc27205b84032f329 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sun, 14 Sep 2025 17:21:58 +0300 Subject: [PATCH 3/5] fix: Apply suggestions --- system/Honeypot/Exceptions/HoneypotException.php | 10 ---------- system/I18n/Exceptions/I18nException.php | 2 +- system/Language/en/Honeypot.php | 1 - system/Language/en/Router.php | 2 +- system/Language/en/Security.php | 3 +-- system/Language/en/Time.php | 1 - system/Router/Exceptions/RouterException.php | 2 +- user_guide_src/source/changelogs/v4.6.4.rst | 10 ++++++---- 8 files changed, 10 insertions(+), 21 deletions(-) diff --git a/system/Honeypot/Exceptions/HoneypotException.php b/system/Honeypot/Exceptions/HoneypotException.php index 7ff493e4edf8..2a03ec2a8d5c 100644 --- a/system/Honeypot/Exceptions/HoneypotException.php +++ b/system/Honeypot/Exceptions/HoneypotException.php @@ -37,16 +37,6 @@ public static function forNoNameField() return new static(lang('Honeypot.noNameField')); } - /** - * Thrown when the hidden value of config is false. - * - * @return static - */ - public static function forNoHiddenValue() - { - return new static(lang('Honeypot.noHiddenValue')); - } - /** * Thrown when there are no data in the request of honeypot field. * diff --git a/system/I18n/Exceptions/I18nException.php b/system/I18n/Exceptions/I18nException.php index 79c9e8326ad0..ec9dd3277e1e 100644 --- a/system/I18n/Exceptions/I18nException.php +++ b/system/I18n/Exceptions/I18nException.php @@ -72,7 +72,7 @@ public static function forInvalidOverDay(string $lastDay, string $day) */ public static function forInvalidHour(string $hour) { - return new static(lang('Time.invalidHour', [$hour])); + return new static(lang('Time.invalidHours', [$hour])); } /** diff --git a/system/Language/en/Honeypot.php b/system/Language/en/Honeypot.php index 1e60387bc768..c7589247d89c 100644 --- a/system/Language/en/Honeypot.php +++ b/system/Language/en/Honeypot.php @@ -15,6 +15,5 @@ return [ 'noTemplate' => 'The HTML template for the Honeypot is not configured.', 'noNameField' => 'The name of the Honeypot field has not been set.', - 'noHiddenValue' => 'The Honeypot should be invisible to humans.', 'theClientIsABot' => 'The Honeypot client may be a bot.', ]; diff --git a/system/Language/en/Router.php b/system/Language/en/Router.php index 41748a66dda4..a073d98d4ada 100644 --- a/system/Language/en/Router.php +++ b/system/Language/en/Router.php @@ -13,7 +13,7 @@ // Router language settings return [ - 'invalidParameterType' => 'A parameter does not match the expected type.', + 'invalidParameter' => 'A parameter does not match the expected type.', 'missingDefaultRoute' => 'Unable to determine what should be displayed. A default route has not been specified in the routing file.', 'invalidDynamicController' => 'A dynamic controller is not allowed for security reasons. Route handler: "{0}"', 'invalidControllerName' => 'The namespace delimiter is a backslash (\\), not a slash (/). Route handler: "{0}"', diff --git a/system/Language/en/Security.php b/system/Language/en/Security.php index 1d99bad1ebd5..fd906e378a29 100644 --- a/system/Language/en/Security.php +++ b/system/Language/en/Security.php @@ -17,6 +17,5 @@ 'insecureCookie' => 'Attempted to send a secure cookie over a non-secure connection.', // @deprecated - 'invalidSameSite' => 'The SameSite value must be None, Lax, Strict, or a blank string. Given: "{0}"', - 'invalidSameSiteSetting' => 'The SameSite setting must be None, Lax, Strict, or a blank string. Given: {0}', + 'invalidSameSite' => 'The SameSite value must be None, Lax, Strict, or a blank string. Given: "{0}"', ]; diff --git a/system/Language/en/Time.php b/system/Language/en/Time.php index 0f37b1812caf..2cb25218a1db 100644 --- a/system/Language/en/Time.php +++ b/system/Language/en/Time.php @@ -32,5 +32,4 @@ 'yesterday' => 'Yesterday', 'tomorrow' => 'Tomorrow', 'now' => 'Just now', - 'invalidHour' => 'The supplied hour "{0}" is outside the range of allowed hours (1-24).', ]; diff --git a/system/Router/Exceptions/RouterException.php b/system/Router/Exceptions/RouterException.php index 378647289a72..7a65603d84b2 100644 --- a/system/Router/Exceptions/RouterException.php +++ b/system/Router/Exceptions/RouterException.php @@ -28,7 +28,7 @@ class RouterException extends FrameworkException implements ExceptionInterface */ public static function forInvalidParameterType() { - return new static(lang('Router.invalidParameterType')); + return new static(lang('Router.invalidParameter')); } /** diff --git a/user_guide_src/source/changelogs/v4.6.4.rst b/user_guide_src/source/changelogs/v4.6.4.rst index 6f7aa6932473..385023cb256d 100644 --- a/user_guide_src/source/changelogs/v4.6.4.rst +++ b/user_guide_src/source/changelogs/v4.6.4.rst @@ -18,10 +18,7 @@ BREAKING Message Changes *************** -- Added ``Honeypot.noTemplate``, ``Honeypot.noNameField``, ``Honeypot.noHiddenValue``, ``Honeypot.theClientIsABot``. -- Added ``Time.invalidHour``. -- Changed ``Router.invalidParameter`` to ``Router.invalidParameterType``. -- Added deprecated ``Security.invalidSameSiteSetting``. +- Added ``Honeypot.noTemplate``, ``Honeypot.noNameField``, ``Honeypot.theClientIsABot``. ******* Changes @@ -29,6 +26,11 @@ Changes - **Config:** Added the ``synchronous`` key for ``Config\Database::$tests``. For SQLite3 driver only. +Exceptions +========== + +- The unused ``CodeIgniter\Honeypot\Exceptions\HoneypotException::forNoHiddenValue()`` method has been removed. + ************ Deprecations ************ From 4bfab1c9be0aaecccc7c4e157225228f2cd0ee1b Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sun, 14 Sep 2025 18:16:33 +0300 Subject: [PATCH 4/5] fix: Restore and mark as deprecated `forNoHiddenValue()` --- system/Honeypot/Exceptions/HoneypotException.php | 12 ++++++++++++ user_guide_src/source/changelogs/v4.6.4.rst | 8 +++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/system/Honeypot/Exceptions/HoneypotException.php b/system/Honeypot/Exceptions/HoneypotException.php index 2a03ec2a8d5c..5185f6d3c843 100644 --- a/system/Honeypot/Exceptions/HoneypotException.php +++ b/system/Honeypot/Exceptions/HoneypotException.php @@ -37,6 +37,18 @@ public static function forNoNameField() return new static(lang('Honeypot.noNameField')); } + /** + * Thrown when the hidden value of config is false. + * + * @return static + * + * @deprecated 4.6.4 Never used. + */ + public static function forNoHiddenValue() + { + return new static(lang('Honeypot.noHiddenValue')); + } + /** * Thrown when there are no data in the request of honeypot field. * diff --git a/user_guide_src/source/changelogs/v4.6.4.rst b/user_guide_src/source/changelogs/v4.6.4.rst index 385023cb256d..ed9909d0face 100644 --- a/user_guide_src/source/changelogs/v4.6.4.rst +++ b/user_guide_src/source/changelogs/v4.6.4.rst @@ -26,15 +26,13 @@ Changes - **Config:** Added the ``synchronous`` key for ``Config\Database::$tests``. For SQLite3 driver only. -Exceptions -========== - -- The unused ``CodeIgniter\Honeypot\Exceptions\HoneypotException::forNoHiddenValue()`` method has been removed. - ************ Deprecations ************ +- **Exception:** + - The ``CodeIgniter\Honeypot\Exceptions\HoneypotException::forNoHiddenValue()`` method has been deprecated. Never used. + ********** Bugs Fixed ********** From c4c12c0591a59a4a38f79f19f30a9d22b3dbb83f Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Sun, 14 Sep 2025 18:50:52 +0300 Subject: [PATCH 5/5] fix: Minor typo --- system/Language/en/Honeypot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Language/en/Honeypot.php b/system/Language/en/Honeypot.php index c7589247d89c..65676da56017 100644 --- a/system/Language/en/Honeypot.php +++ b/system/Language/en/Honeypot.php @@ -14,6 +14,6 @@ // Honeypot language settings return [ 'noTemplate' => 'The HTML template for the Honeypot is not configured.', - 'noNameField' => 'The name of the Honeypot field has not been set.', + 'noNameField' => 'The name of the Honeypot field is not set.', 'theClientIsABot' => 'The Honeypot client may be a bot.', ];