application . '/config/config.php'; if (file_exists($path)) { $toMerge[] = require $path; } // App-related env-dependent configuration $path = self::ROOT_PATH . '/' . $this->application . '/config/config-' . YII_ENV . '.php'; if (file_exists($path)) { $toMerge[] = require $path; } // App-related local configuration $path = self::ROOT_PATH . '/' . $this->application . '/config/config-local.php'; if (file_exists($path)) { $toMerge[] = require $path; } // @phpstan-ignore arguments.count (Should be covered by Yii2 extension) return ArrayHelper::merge(...$toMerge); } /** * @return array */ public static function load(string $application): array { return (new self($application))->getConfig(); } }