tabuna / web-socket

Laravel library for asynchronously serving WebSockets.
MIT License
219 stars 29 forks source link

Xdebug prevents the socket from starting in PHP 7.2 #25

Open bryce13950 opened 6 years ago

bryce13950 commented 6 years ago

When working locally on a VM, the socket cannot be started, because of an exception being thrown whenever xdebug is enabled in the installation.

  Exception trace:

  1   trigger_error("XDebug extension detected. Remember to disable this if performance testing or going live!")
      /vagrant/code/vendor/cboden/ratchet/src/Ratchet/App.php : 66

  2   Ratchet\App::__construct("localhost", "8080", "127.0.0.1")
      /vagrant/code/vendor/orchid/socket/src/Console/Server.php : 61

  Please use the argument -v to see more details.
tabuna commented 6 years ago

The package does not work with the module enabled. Please disable it Debugger always analyzes the script and stores it in memory, since the socket does not die, this results in an endless memory devouring.

bryce13950 commented 6 years ago

Is there a purpose for this not working with xdebug? This seems a bit arbitrary, especially since the exception message explicitly states that xdebug should be disabled in live, or performance testing environments. I am not in either of those environments, so I do not see why this does not work. Is there something in the source base that makes it incapable of running with xdebug outside of this exception?

tabuna commented 6 years ago

This package requirement

I know that there were a lot of problems with this when the xdebug was turned on. https://github.com/ratchetphp/Ratchet/issues?utf8=%E2%9C%93&q=xdebug