I have started to get serious problems with settings from .env not picked up by CI4.
Just now I stopped getting exceptions thrown on Database errors due to the setting in app/config/Database.php:
PHP Code:
public $default = [
// ...
'DBDebug' => (ENVIRONMENT !== 'production'),
// ...
];
In my .env I have set CI_ENVIRONMENT = development but still if I do a die(ENVIRONMENT) in app/config/Database.php::__construct I get "production" and thus DBDebug = false and thus I have unnoticed bugs in my code.
This happens on PHP 7.3.26 now both in CLI and in Apache. Running on macOS 10.15.7 installed via homebrew.