err('Unable to load Psy\Shell.'); $this->err(''); $this->err('Make sure you have installed psysh as a dependency,'); $this->err('and that Psy\Shell is registered in your autoloader.'); $this->err(''); $this->err('If you are using composer run'); $this->err(''); $this->err('$ php composer.phar require --dev psy/psysh'); $this->err(''); return self::CODE_ERROR; } $this->out("You can exit with `CTRL-C` or `exit`"); $this->out(''); Log::drop('debug'); Log::drop('error'); $this->_io->setLoggers(false); restore_error_handler(); restore_exception_handler(); $psy = new PsyShell(); $psy->run(); } /** * Display help for this console. * * @return \Cake\Console\ConsoleOptionParser */ public function getOptionParser() { $parser = new ConsoleOptionParser('console'); $parser->description( 'This shell provides a REPL that you can use to interact ' . 'with your application in an interactive fashion. You can use ' . 'it to run adhoc queries with your models, or experiment ' . 'and explore the features of CakePHP and your application.' . "\n\n" . 'You will need to have psysh installed for this Shell to work.' ); return $parser; } }