{"record":{"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/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Concurrency/ConcurrencyManager.php#L34-L70","documentation":"Thrown by ConcurrencyManager::createForkDriver() when the spatie/fork package class (Fork) is not autoloadable. The fork driver delegates to Spatie\\Fork\\Fork, which is an optional dependency; if the package is absent the driver cannot operate and throws RuntimeException directing the user to install it.","triggerScenarios":"Selecting the 'fork' driver (via config or Concurrency::driver('fork')) without having run composer require spatie/fork; the package was removed or composer install was incomplete.","commonSituations":"Defaulting concurrency.driver to 'fork' in a fresh checkout; deploying without composer install --no-dev removing the package; CI environment missing the dependency.","solutions":["Install the package: composer require spatie/fork.","Run composer install to restore a missing vendor dependency.","Switch to the 'process' driver if forking is not required/available."],"exampleFix":"// before\n// 'fork' driver selected but package missing\n// after\ncomposer require spatie/fork","handlingStrategy":"validation","validationCode":"if (! class_exists(\\Spatie\\Fork\\Fork::class)) {\n    throw new \\RuntimeException('Run: composer require spatie/fork');\n}","typeGuard":"function forkAvailable(): bool {\n    return class_exists(\\Spatie\\Fork\\Fork::class);\n}","tryCatchPattern":"try {\n    return Concurrency::driver('fork')->run($tasks);\n} catch (\\RuntimeException $e) {\n    return Concurrency::driver('process')->run($tasks);\n}","preventionTips":["Run composer require spatie/fork when selecting the fork driver.","Pin the dependency in composer.json and verify vendor/ after deploy.","Default to the 'process' driver in shared/CI environments."],"tags":["concurrency","fork","dependencies","composer","laravel"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}