cakephp: Exception: Shell class for "WalletManager.Coin" could not be found.

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: v3.4.7

  • Platform and Target: LAMP

What you did

└──╼ bin/cake bake shell coin --plugin WalletManager
Welcome to CakePHP v3.4.7 Console
---------------------------------------------------------------
App : src
Path: /Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/src/
PHP : 5.6.30
---------------------------------------------------------------
Creating file /Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/plugins/WalletManager/src/Shell/CoinShell.php
Wrote `/Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/plugins/WalletManager/src/Shell/CoinShell.php`
Bake.Test
Baking test case for WalletManager\Shell\CoinShell ...
Creating file /Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/plugins/WalletManager/tests/TestCase/Shell/CoinShellTest.php
Wrote `/Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/plugins/WalletManager/tests/TestCase/Shell/CoinShellTest.php`

What happened

└──╼ bin/cake coin --plugin WalletManager
Exception: Shell class for "WalletManager.Coin" could not be found. in [/Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 327]
└──╼ bin/cake coin
Exception: Shell class for "WalletManager.Coin" could not be found. in [/Users/jlroberts/Projects/AltCoinWallet.Solutions/CakeCoin/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 327]

What you expected to happen

CoinShell::main();

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

Could it be an issue with the auto-loader ? Like composer does not know how to load the class ?

Do you have a WalletManager namespace referenced in the autoload section of your composer.json file ? If yes, have you tried to composer dump-autoload and run the shell again to see if it fixes the issue ?