{"id":"4e8846db723cace4","repo":"laravel/framework","slug":"please-install-the-spatie-fork-composer-package","errorCode":null,"errorMessage":"Please install the \"spatie/fork\" Composer package in order to utilize the \"fork\" driver.","messagePattern":"Please install the \"spatie/fork\" Composer package in order to utilize the \"fork\" driver\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Concurrency/ConcurrencyManager.php","lineNumber":52,"sourceCode":"    {\n        return new ProcessDriver($this->app->make(ProcessFactory::class));\n    }\n\n    /**\n     * Create an instance of the fork concurrency driver.\n     *\n     * @return \\Illuminate\\Concurrency\\ForkDriver\n     *\n     * @throws \\RuntimeException\n     */\n    public function createForkDriver()\n    {\n        if (! $this->app->runningInConsole()) {\n            throw new RuntimeException('Due to PHP limitations, the fork driver may not be used within web requests.');\n        }\n\n        if (! class_exists(Fork::class)) {\n            throw new RuntimeException('Please install the \"spatie/fork\" Composer package in order to utilize the \"fork\" driver.');\n        }\n\n        return new ForkDriver;\n    }\n\n    /**\n     * Create an instance of the sync concurrency driver.\n     *\n     * @return \\Illuminate\\Concurrency\\SyncDriver\n     */\n    public function createSyncDriver()\n    {\n        return new SyncDriver;\n    }\n\n    /**\n     * Get the default instance name.\n     *","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/laravel/framework/blob/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Concurrency/ConcurrencyManager.php#L34-L70","documentation":"Thrown by ConcurrencyManager::createForkDriver() when the Fork class (spatie/fork) is not present in the autoloader. The fork driver depends on the optional spatie/fork Composer package, which is not bundled with Laravel. RuntimeException prompts the user to install it.","triggerScenarios":"Requesting the 'fork' driver without having run composer require spatie/fork. Also after a fresh deploy where composer dependencies were installed with --no-dev and spatie/fork was a dev requirement, or after removing it.","commonSituations":"New project enabling concurrency with the fork driver for the first time. CI/deploy environments missing optional packages. Team members who didn't run composer require after pulling.","solutions":["Install the package: composer require spatie/fork.","Ensure composer install runs in all deploy/CI environments (not --no-dev if it's a dev requirement).","If fork isn't available, switch the driver to 'process' or 'sync'."],"exampleFix":"// before\n// fork driver requested but package missing\n\n// after (shell)\ncomposer require spatie/fork","handlingStrategy":"fallback","validationCode":"if (! class_exists(\\Spatie\\Fork\\Fork::class)) {\n    config(['concurrency.default' => 'process']);\n}","typeGuard":"function forkAvailable(): bool { return class_exists(\\Spatie\\Fork\\Fork::class); }","tryCatchPattern":"try {\n    $driver = app(\\Illuminate\\Concurrency\\ConcurrencyManager::class)->driver('fork');\n} catch (\\RuntimeException $e) {\n    $driver = app(\\Illuminate\\Concurrency\\ConcurrencyManager::class)->driver('process');\n}","preventionTips":["Run composer require spatie/fork once fork is intended; commit composer.lock.","Ensure composer install (not --no-dev) runs in every deploy/CI env if the package is required as dev.","Default to 'process' and let only explicitly fork-enabled environments switch to 'fork'."],"tags":["laravel","concurrency","fork","missing-dependency","composer"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}