{"id":"48225e7c346669ef","repo":"laravel/framework","slug":"a-container-implementation-is-required-to-use-the","errorCode":null,"errorMessage":"A container implementation is required to use the scheduler. Please install the illuminate/container package.","messagePattern":"A container implementation is required to use the scheduler\\. Please install the illuminate/container package\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/Illuminate/Console/Scheduling/Schedule.php","lineNumber":130,"sourceCode":"     * Indicates if the schedule should check for the interrupt signal in the cache.\n     *\n     * @var bool\n     */\n    public static $interruptible = true;\n\n    /**\n     * Create a new schedule instance.\n     *\n     * @param  \\DateTimeZone|string|null  $timezone\n     *\n     * @throws \\RuntimeException\n     */\n    public function __construct($timezone = null)\n    {\n        $this->timezone = $timezone;\n\n        if (! class_exists(Container::class)) {\n            throw new RuntimeException(\n                'A container implementation is required to use the scheduler. Please install the illuminate/container package.'\n            );\n        }\n\n        $container = Container::getInstance();\n\n        $this->eventMutex = $container->bound(EventMutex::class)\n            ? $container->make(EventMutex::class)\n            : $container->make(CacheEventMutex::class);\n\n        $this->schedulingMutex = $container->bound(SchedulingMutex::class)\n            ? $container->make(SchedulingMutex::class)\n            : $container->make(CacheSchedulingMutex::class);\n    }\n\n    /**\n     * Add a new callback event to the schedule.\n     *","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/laravel/framework/blob/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Console/Scheduling/Schedule.php#L112-L148","documentation":"Thrown by Schedule::__construct() (src/Illuminate/Console/Scheduling/Schedule.php:130) when Illuminate\\Container\\Container is not autoloadable. The scheduler resolves the container, mutexes, and dispatcher from Container::getInstance(), so the container package is mandatory.","triggerScenarios":"Instantiating new Schedule() in an environment that loads only illuminate/console without illuminate/container (e.g. a minimal composer setup pulling sub-packages directly).","commonSituations":"Pulling individual illuminate/* packages (console, scheduling) rather than laravel/framework, missing illuminate/container in composer.json, or a broken autoloader after package removal.","solutions":["composer require illuminate/container (and illuminate/cache, illuminate/events for mutexes).","Prefer requiring laravel/framework or illuminate/contracts as a metapackage to pull all deps.","Run composer dump-autoload after dependency changes.","Verify Container::getInstance() returns an instance in your bootstrap."],"exampleFix":"// before\n// composer.json -> \"illuminate/console\": \"^11.0\"  (no container)\n\n// after\n// composer.json -> \"illuminate/console\": \"^11.0\",\n//                    \"illuminate/container\": \"^11.0\"\n// or simply\n// \"laravel/framework\": \"^11.0\"","handlingStrategy":"validation","validationCode":"if (! class_exists(\\Illuminate\\Container\\Container::class)) {\n    // require illuminate/container before bootstrapping the scheduler\n}","typeGuard":"function schedulerDepsPresent(): bool\n{\n    return class_exists(\\Illuminate\\Container\\Container::class);\n}","tryCatchPattern":"try {\n    $schedule = new \\Illuminate\\Console\\Scheduling\\Schedule();\n} catch (\\RuntimeException $e) {\n    // install missing package, then retry\n}","preventionTips":["Require laravel/framework or the full illuminate/* set rather than subsets.","Run composer dump-autoload after dependency changes.","Add a boot-time dep check in CI."],"tags":["scheduling","console","dependency","composer","laravel"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}