Is your feature request related to a problem? Please describe.
I've used current Slim4 server in my personal project and I think that config file should be extracted from index.php. The most suitable format is config.inc.php.
Describe the solution you'd like
I'll add config folder with example.inc.php. User should copy that file to prod.inc.php and dev.inc.php. I prefer config.inc.php format over .env and .ini because these formats can be used only for flags or string variables. So config.inc.php file is the only way if you need to specify callback:
return [
'getPDOConnection' => function () {
return new PDO('mysql:dbname=dbname;host=localhost;charset=UTF8', 'root', 'root');
},
];
Is your feature request related to a problem? Please describe.
I've used current Slim4 server in my personal project and I think that config file should be extracted from
index.php. The most suitable format isconfig.inc.php.Describe the solution you'd like
I'll add
configfolder withexample.inc.php. User should copy that file toprod.inc.phpanddev.inc.php. I preferconfig.inc.phpformat over.envand.inibecause these formats can be used only for flags or string variables. Soconfig.inc.phpfile is the only way if you need to specify callback: