Is there a way to check for development mode in code, php code
weierophinney opened this issue · 2 comments
weierophinney commented
How to check if the development mode is enabled or not in code
Originally posted by @waqarprojectinertia at zfcampus/zf-development-mode#28
weierophinney commented
@waqarprojectinertia Enabling development mode copy files:
config/development.config.php.dist
toconfig/development.config.php
config/autoload/development.local.php.dist
toconfig/autoload/development.local.php
so if you want to check it in code, please check if you have these files. It means you have enabled development mode.
You can also check status of development mode using console command:
$ ./vendor/bin/zf-development-mode status
Originally posted by @michalbundyra at zfcampus/zf-development-mode#28 (comment)
samsonasik commented
Via code, you can check with :
var_dump((file_exists(\Laminas\DevelopmentMode\Status::DEVEL_CONFIG)));