You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After having used generator to scaffold a plugin (within which everything appears to work as intended) I then needed to build another new plugin; leading me to notice that craft console is broken.
It throws the following exception when I try to run any craft command (eg php craft)
The error message + stack trace is showing that plugins/passwordy/src/Plugin.php is attempting to call Craft::$app->request->isPost on line 102. However isPost is only available for web requests, when Craft::$app->request is an instance of craft\web\Request. On console requests, it will be an instance of craft\console\Request.
Not sure what your code looks like exactly there, but you can fix by first making sure it’s not a console request by calling Craft::$app->request->isConsoleRequest.
Description
After having used generator to scaffold a plugin (within which everything appears to work as intended) I then needed to build another new plugin; leading me to notice that craft console is broken.
It throws the following exception when I try to run any craft command (eg php craft)
I have no idea how to start fixing this so any help appreciated!
Edit:
I tried running: composer dump-autoload
It hasn't fixed it though.
Additional info
The text was updated successfully, but these errors were encountered: