0

The following is a snippet from my console, I baked a shell, and immediately try to use it, it should output getOptionParser, but it throws a MissingShell Exception instead, any ideas?

└──╼ bin/cake bake shell coin --plugin WalletManager
Welcome to CakePHP v3.4.7 Console
---------------------------------------------------------------
App : src
Path: Projects/AltCoinWallet.Solutions/CakeCoin/src/
PHP : 5.6.30
---------------------------------------------------------------
Creating file plugins/WalletManager/src/Shell/CoinShell.php
Wrote `plugins/WalletManager/src/Shell/CoinShell.php`


└──╼ bin/cake coin
Exception: Shell class for "..." could not be found. 
in [...src/Console/ShellDispatcher.php, line 327]
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69

1 Answers1

2

You've baked a plugin shell, hence you need to refer to the plugin:

bin/cake wallet_manager.coin

or

bin/cake WalletManager.coin

See also

ndm
  • 59,784
  • 9
  • 71
  • 110
  • └──╼ bin/cake WalletManager.coin Exception: Shell class for "WalletManager.Coin" could not be found. in [.../src/Console/ShellDispatcher.php, line 327] – Jeffrey L. Roberts Jun 09 '17 at 08:52
  • @JeffreyL.Roberts Please try both syntaxes, make sure that the plugin is being loaded in your bootstrap, and that the autoloader contains your plugin and is up to date. – ndm Jun 09 '17 at 09:00
  • turns out, it wasn't in the composer.json autoloader – Jeffrey L. Roberts Jun 21 '17 at 01:57