The components aren’t loaded until after the config file. Not surprising, given that the config file contains the information needed to load them. You could include/require ConfigManager.php in your config file.
Actually I have some other configuration parameters like
$serverTimeZone = 'Asia/Calcutta';
What I would like to have single configuration file that just need to be edited while configuring the application. So I want to have ConfigManager file to place all the configurations and it will configure rest of the application.
May be its not right idea!
There are lot of ways to do something similar. My favorite approach is to keep a file local.php in config/ that gets merged into the main.php config array. That way you can override/add settings in your local config file. Similar to this: