From 5f5ad57c616cccf0c05e42968e81c024b299244b Mon Sep 17 00:00:00 2001 From: Thomas Meschke Date: Tue, 16 Jun 2026 16:01:35 +0200 Subject: [PATCH 1/2] fix: unify casing in BaseService::injectMock --- system/Config/BaseService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index 483da962d5ad..579879e9c768 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -445,8 +445,9 @@ public static function resetSingle(string $name) */ public static function injectMock(string $name, $mock) { - static::$instances[$name] = $mock; - static::$mocks[strtolower($name)] = $mock; + $name = strtolower($name); + static::$instances[$name] = $mock; + static::$mocks[$name] = $mock; } /** From 2efcc681c44da3447ae3d2573603f236efde39e0 Mon Sep 17 00:00:00 2001 From: Thomas Meschke Date: Thu, 18 Jun 2026 12:39:59 +0200 Subject: [PATCH 2/2] add changelog entry --- user_guide_src/source/changelogs/v4.7.4.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelogs/v4.7.4.rst b/user_guide_src/source/changelogs/v4.7.4.rst index 1373f9fa1720..1cf22169f347 100644 --- a/user_guide_src/source/changelogs/v4.7.4.rst +++ b/user_guide_src/source/changelogs/v4.7.4.rst @@ -35,6 +35,7 @@ Bugs Fixed - **Common:** Fixed a bug in ``env()`` where a ``TypeError`` could be thrown when non-string values were passed. - **Common:** Fixed ``esc()`` to propagate encoding correctly and prevent reference leaks. - **Commands:** Fixed a bug where ``spark lang:find`` treated translation keys already provided by the framework or another namespace (such as ``Errors.*`` in ``system/Language``) as new, listing them under ``--show-new`` and writing untranslated placeholders into ``app/Language`` that overrode the existing translations. +- **Config:** Fixed a bug where ``BaseService::injectMock`` did not apply ``strtolower`` consistently, causing inconsistent Service and Mock registration and resolution. - **Database:** Fixed a bug where ``updateBatch()`` could be called after Query Builder ``where()`` conditions, even though it's not supported. In this situation, now the ``DatabaseException`` is thrown. - **Filters:** Fixed a bug in ``InvalidChars`` filter where invalid UTF-8 or control characters in array keys were not checked. - **HTTP:** Fixed a bug where the User Agent library reported Safari's WebKit version instead of the browser version from the ``Version`` token.