{"record":{"id":"640344ec9273cb21","repo":"passbolt/passbolt_api","slug":"make-sure-you-have-installed-psysh-as-a-dependency","errorCode":null,"errorMessage":"Make sure you have installed psysh as a dependency,","messagePattern":"Make sure you have installed psysh as a dependency,","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/Command/ConsoleCommand.php","lineNumber":44,"sourceCode":"\n/**\n * Simple console wrapper around Psy\\Shell.\n */\nclass ConsoleCommand extends Command\n{\n    /**\n     * Start the Command and interactive console.\n     *\n     * @param \\Cake\\Console\\Arguments $args The command arguments.\n     * @param \\Cake\\Console\\ConsoleIo $io The console io\n     * @return int|null|void The exit code or null for success\n     */\n    public function execute(Arguments $args, ConsoleIo $io) // phpcs:ignore\n    {\n        if (!class_exists('Psy\\Shell')) {\n            $io->err('<error>Unable to load Psy\\Shell.</error>');\n            $io->err('');\n            $io->err('Make sure you have installed psysh as a dependency,');\n            $io->err('and that Psy\\Shell is registered in your autoloader.');\n            $io->err('');\n            $io->err('If you are using composer run');\n            $io->err('');\n            $io->err('<info>$ php composer.phar require psy/psysh</info>');\n            $io->err('');\n\n            return static::CODE_ERROR;\n        }\n\n        $io->out('You can exit with <info>`CTRL-C`</info> or <info>`exit`</info>');\n        $io->out();\n\n        Log::drop('debug');\n        Log::drop('error');\n        $io->setLoggers(false);\n        restore_error_handler();\n        restore_exception_handler();","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/src/Command/ConsoleCommand.php#L26-L62","documentation":"Second line of the Psy\\Shell guidance printed by ConsoleCommand when psysh is not installed: 'Make sure you have installed psysh as a dependency,'. Purely instructional stderr output explaining the likely cause of the console command failing to start.","triggerScenarios":"`bin/cake passbolt console` executed without psy/psysh present in the autoloader.","commonSituations":"Fresh checkouts running console before installing suggested dev dependencies; CI containers stripping dev requirements.","solutions":["Run composer require --dev psy/psysh.","Regenerate the autoloader (composer dump-autoload) if the package exists but isn't autoloaded."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if (!class_exists('Psy\\Shell')) { echo \"Install psysh first\\n\"; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document psy/psysh as a required dev tool for contributors","Run composer install after cloning the repo"],"tags":["cli","console","dependency"],"backgroundTag":"missing-dependency","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}