Cant run shell script with option parser description with cake4

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();

        __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();


Pretty self-explanatory error message, I’d say. The description method no longer exists in that class. You want to change it to setDescription.