Hi, I’m moving an app from 2 to 3.7. In 2 I was using a shell to call a function in a controller via requestAction(), but can’t make it work on 3.7. I know I need to move away from a shell by 5.0, but don’t have the time to figure out how just now. My shell code in src/Shell/NotificationsShell.php is:-
<?php
namespace App\Shell;
use Cake\Console\Shell;
use Cake\Routing\RequestActionTrait;
class NotificationsShell extends Shell {
var $uses = array('User','Trip','Lunch');
function main() {
$this->layout = null;
$this->autoRender = false;
$this->requestAction('Notifications/notification');
}
}
and the error I get when running bin/cake Notifications is:-
Call to undefined method App\Shell\NotificationsShell::requestAction() in /home/probusgi/public_html/ProbusLive/src/Shell/NotificationsShell.php on line 12