Use RATCHET_DISABLE_XDEBUG_WARN env var for disable user warning.

This commit is contained in:
samizdam 2018-03-03 00:19:44 +03:00
parent 77b879c114
commit 0b6fac212c

View File

@ -62,7 +62,7 @@ class App {
* @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you.
*/
public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null) {
if (extension_loaded('xdebug')) {
if (extension_loaded('xdebug') && getenv('RATCHET_DISABLE_XDEBUG_WARN') === false) {
trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING);
}