Skip to content

Commit 5b80574

Browse files
committed
Force lowercase service names. Fixes #2534
1 parent a6bb348 commit 5b80574

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

system/Config/BaseService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class BaseService
6666
/**
6767
* Cache for instance of any services that
6868
* have been requested as a "shared" instance.
69+
* Keys should be lowercase service names.
6970
*
7071
* @var array
7172
*/
@@ -106,6 +107,8 @@ class BaseService
106107
*/
107108
protected static function getSharedInstance(string $key, ...$params)
108109
{
110+
$key = strtolower($key);
111+
109112
// Returns mock if exists
110113
if (isset(static::$mocks[$key]))
111114
{

0 commit comments

Comments
 (0)