CakePHP 3.7插件内的Shell命令无法执行

时间:2019-07-08 10:13:58

标签: cakephp-3.7

namespace Admin\Shell;
use Cake\Console\Shell;
class AdminAlertShell extends Shell{
  ...
  ...
}

这里“ Admin”是插件,因此我在plugins文件夹结构内创建了此文件。 文件路径:/plugins/Admin/src/Shell/AdminAlertShell.php

试图在CLI中运行

bin/cake admin_alert

但是抛出异常

异常:未知命令cake admin_alert。运行cake --help以获取有效命令的列表。在[localpath / vendor / cakephp / cakephp / src / Console / CommandRunner.php,第346行]

正在工作。但是我不知道发生了什么事。我已经将Cakephp 3.5升级到3.7。但是,我不确定这是导致问题的原因。

0 个答案:

没有答案