Use the new root_path service to make some code more portable
This commit is contained in:
parent
f2be3a7e5b
commit
1e17dff21e
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ class ConfigFactory
|
|||
*/
|
||||
public static function create(Container $container): Config
|
||||
{
|
||||
$configPath = __DIR__ . '/../../config/config.yml';
|
||||
$configPath = $container->get('root_path') . '/config/config.yml';
|
||||
if (is_file($configPath)) {
|
||||
$config = Config::fromFile($configPath);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue