I am updating to cake4 and this sheel script i used in my older cake 3.X version wont wok in cake 4 .
I dont know what to do. I am using php ver 7.4
Exception: Call to undefined method Cake\Console\ConsoleOptionParser::description()
public function getOptionParser() {
$parser = parent::getOptionParser();
$parser->description(
__d('cake_console', 'A console tool for managing invoices')
)->addSubcommand('lessonratingscron', array(
'help' => __d('cake_console', 'Create a Lesson Rating ')
Also tried
public function getOptionParser(): \Cake\Console\ConsoleOptionParser {
$parser = parent::getOptionParser();
$parser->description(