Below is my shell class
FriendShell.php
require_once 'AppShell.php';
class FriendShell extends AppShell
{
//code
}
AppShell.php
App::uses('Shell', 'Console');
class AppShell extends Shell {
public function perform() {
$this->initialize();
$this->{array_shift($this->args)}();
}
}
Reference to issue on
https://github.com/kamisama/Cake-Resque/issues/25
I removed
App::uses('AppShell', 'Console/Command');
and now using
require_once 'AppShell.php';
in FriendShell.php
But problem still remains because AppShell.php using
App::uses('Shell', 'Console');
That's why I am getting error Class 'App' not found when trying to run that shell.
Any help appreciated
Thank you
App::uses('AppShell','Vendor/Shells');. AlsoAppwould be undefined if you start the shell incorrectly.