laminas / laminas-development-mode

Laminas development mode script
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Is there a way to check for development mode in code, php code #4

Closed weierophinney closed 4 years ago

weierophinney commented 4 years ago

How to check if the development mode is enabled or not in code


Originally posted by @waqarprojectinertia at https://github.com/zfcampus/zf-development-mode/issues/28

weierophinney commented 4 years ago

@waqarprojectinertia Enabling development mode copy files:

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 https://github.com/zfcampus/zf-development-mode/issues/28#issuecomment-282975859

samsonasik commented 4 years ago

Via code, you can check with :

var_dump((file_exists(\Laminas\DevelopmentMode\Status::DEVEL_CONFIG)));