{"id":"7b45801ab92b339d","repo":"laravel/framework","slug":"driver-config-driver-is-not-supported","errorCode":null,"errorMessage":"Driver [{$config['driver']}] is not supported.","messagePattern":"Driver \\[(.+?)\\] is not supported\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Broadcasting/BroadcastManager.php","lineNumber":313,"sourceCode":"     * @throws \\InvalidArgumentException\n     * @throws \\RuntimeException\n     */\n    protected function resolve($name)\n    {\n        $config = $this->getConfig($name);\n\n        if (is_null($config)) {\n            throw new InvalidArgumentException(\"Broadcast connection [{$name}] is not defined.\");\n        }\n\n        if (isset($this->customCreators[$config['driver']])) {\n            return $this->callCustomCreator($config);\n        }\n\n        $driverMethod = 'create'.ucfirst($config['driver']).'Driver';\n\n        if (! method_exists($this, $driverMethod)) {\n            throw new InvalidArgumentException(\"Driver [{$config['driver']}] is not supported.\");\n        }\n\n        try {\n            return $this->{$driverMethod}($config);\n        } catch (Throwable $e) {\n            throw new RuntimeException(\"Failed to create broadcaster for connection \\\"{$name}\\\" with error: {$e->getMessage()}.\", 0, $e);\n        }\n    }\n\n    /**\n     * Call a custom driver creator.\n     *\n     * @param  array  $config\n     * @return mixed\n     */\n    protected function callCustomCreator(array $config)\n    {\n        return $this->customCreators[$config['driver']]($this->app, $config);","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/laravel/framework/blob/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Broadcasting/BroadcastManager.php#L295-L331","documentation":"Thrown by BroadcastManager::resolve() when the connection config exists but its 'driver' value has no matching create{Driver}Driver method and no custom creator registered via Broadcast::extend(). Built-ins are reverb, pusher, ably, redis, log, null.","triggerScenarios":"Setting broadcasting.connections.{name}.driver to 'websocket' (or a typo like 'pussher') without extending; referencing a driver from a package whose service provider did not boot.","commonSituations":"Renaming drivers across Laravel WebSockets -> Reverb migration; typo in the driver string; using a custom driver without registering Broadcast::extend().","solutions":["Register the custom driver: Broadcast::extend('mydriver', fn ($app, array $config) => new MyBroadcaster($config)).","Use a supported driver (reverb/pusher/ably/redis/log/null).","Correct the typo and ensure the package providing the driver is installed and its provider registered.","Run config:clear after edits."],"exampleFix":"// before\n'connections' => [\n    'main' => ['driver' => 'websocket'], // no createWebsocketDriver\n],\n\n// after\n'connections' => [\n    'main' => ['driver' => 'reverb', 'key' => env('REVERB_APP_KEY'), /* ... */],\n],\n// or in a service provider:\nBroadcast::extend('websocket', fn ($app, $config) => new MyWebsocketBroadcaster($config));","handlingStrategy":"validation","validationCode":"$driver = config(\"broadcasting.connections.{$name}.driver\");\n$supported = in_array($driver, ['reverb', 'pusher', 'ably', 'redis', 'log', 'null'], true);\nif (! $supported) {\n    throw new RuntimeException(\"Broadcast driver [{$driver}] is not supported.\");\n}","typeGuard":"function broadcastDriverIsSupported(string $driver): bool\n{\n    return in_array($driver, ['reverb', 'pusher', 'ably', 'redis', 'log', 'null'], true);\n}","tryCatchPattern":"try {\n    Broadcast::driver($name);\n} catch (\\InvalidArgumentException $e) {\n    // fall back to a supported driver or register the custom one\n}","preventionTips":["Register custom broadcast drivers with Broadcast::extend() in a service provider boot().","Restrict config driver values to the supported set.","Assert at boot that referenced broadcast drivers map to a create method or custom creator."],"tags":["broadcasting","configuration","driver","laravel"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}