Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

[2.x] Target [... OutputInterface] is not instantiable while building [...WebSocketsLogger} #661

@simonbuehler

Description

@simonbuehler

Hi,

when trying to add a custom route via
WebSocketRouter::get('/apps/{appId}/my-websocket', MyCustomWebSocketHandler::class); where
class MyCustomWebSocketHandler implements MessageComponentInterface
the server won't start with the same exception as mentioned in the closed issue #301 (comment)

  Illuminate\Contracts\Container\BindingResolutionException

  Target [Symfony\Component\Console\Output\OutputInterface] is not instantiable while building [BeyondCode\LaravelWebSockets\Server\Loggers\WebSocketsLogger].

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:1038
    1034▕         } else {
    1035▕             $message = "Target [$concrete] is not instantiable.";
    1036▕         }
    1037
  ➜ 1038▕         throw new BindingResolutionException($message);
    1039▕     }
    1040
    1041▕     /**
    1042▕      * Throw an exception for an unresolvable primitive.

      +19 vendor frames
  20  routes/web.php:31
      Illuminate\Support\Facades\Facade::__callStatic("get")

      +4 vendor frames
  25  app/Providers/RouteServiceProvider.php:49
      Illuminate\Routing\RouteRegistrar::group("/var/www/grabber/routes/web.php")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions