diff --git a/system/Config/BaseConfig.php b/system/Config/BaseConfig.php index 9b1b0be94940..0442e45bb55a 100644 --- a/system/Config/BaseConfig.php +++ b/system/Config/BaseConfig.php @@ -181,8 +181,15 @@ protected function registerProperties() if (! static::$didDiscovery) { - $locator = \Config\Services::locator(); - static::$registrars = $locator->search('Config/Registrar.php'); + $locator = \Config\Services::locator(); + $registrarsFiles = $locator->search('Config/Registrar.php'); + + foreach ($registrarsFiles as $file) + { + $className = $locator->getClassname($file); + static::$registrars[] = new $className(); + } + static::$didDiscovery = true; }