You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
When registrering the route for a custom WebSocket handler using: WebSocketsRouter::webSocket('/socket', \App\WS\Handlers\Handler::class)
in reoutes/web.php laravel is unable to boot with the following exception: Target [Symfony\Component\Console\Output\OutputInterface] is not instantiable while building [BeyondCode\LaravelWebSockets\Server\Logger\WebsocketsLogger].
My workaround for the issue is to call:
use Symfony\Component\Console\Output\NullOutput;
app()->singleton(WebsocketsLogger::class, function () {
return (new WebsocketsLogger(new NullOutput()))->enable(false);
});
before the route registering. I guess that defering the route registering to after the the server has setup the loggers would be a solution?
baoanhng, antonkomarev, stephenlake, justinmoh, lancepioch and 2 more