From 5b805749dd88fd07a087a09a4e1fbec5462abf26 Mon Sep 17 00:00:00 2001 From: MGatner Date: Mon, 17 Feb 2020 15:40:57 -0500 Subject: [PATCH] Force lowercase service names. Fixes #2534 --- system/Config/BaseService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index a3eeaed2054d..65aceb124f16 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -66,6 +66,7 @@ class BaseService /** * Cache for instance of any services that * have been requested as a "shared" instance. + * Keys should be lowercase service names. * * @var array */ @@ -106,6 +107,8 @@ class BaseService */ protected static function getSharedInstance(string $key, ...$params) { + $key = strtolower($key); + // Returns mock if exists if (isset(static::$mocks[$key])) {