ddev/ddev-xhgui

[enhancement] prevent working in production

Closed this issue · 2 comments

It is possible (although, if I recall, advised against) to use DDEV as a production environment, but even a direct deployment from a git repository that holds the .ddev folder and with it, the profiler files might encounter a situation in which the profiler is accidentally running.
An example where this might happen, is e.g. on platform.sh, where I noticed that a standard composer project, installs with composer dev requirements.

It might be good to have a way to ensure the profiler isn't running in a production environment, even if the required xhgui php files exist in the expected location and/or the php-profiler package is installed.

rfay commented

I guess IMO people have to sort these things out if they use Casual hosting or use it for other similar purposes. (Lots of people use it for github tests, etc.)

PRs are welcome.

My feeling is DDEV is for local (or cloud) development and testing and therefore it's not the addons responsibility.
Developers are free to use ddev service disable or wrap the profiler commands with ENV checkers.

Let's get the addon to a solid place first and then see where the currents flow.

Closing but happy to open with demand.