Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
weierophinney opened this issue Dec 31, 2019 · 2 comments
Closed

Comments

@weierophinney
Copy link
Member

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


Originally posted by @waqarprojectinertia at zfcampus/zf-development-mode#28

@weierophinney
Copy link
Member Author

@waqarprojectinertia Enabling development mode copy files:

  • config/development.config.php.dist to config/development.config.php
  • config/autoload/development.local.php.dist to config/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
Copy link
Member

Via code, you can check with :

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants