質問 > その他 > bin/consoleコマンドが実行できない |
その他
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
kenshi |
投稿日時: 2020/8/24 11:28
対応状況: −−−
|
一人前 登録日: 2020/6/29 居住地: 投稿: 83 |
bin/consoleコマンドが実行できない 実行できないコマンド:bin/console customize:test
実行可能コマンド:bin/console cache:clear --no-warmup ■カスタマイズファイル namespace Customize\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; /** * Remind cron. */ class RemindCommand extends Command { protected static $defaultName = 'customize:test'; protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); // hello worldを表示 $io->success('hello world'); } } ■エラー内容 PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "Generator" from namespace "Eccube\Tests\Fixture". Did you forget a "use" statement for e.g. "Symfony\Bundle\MakerBundle\Generator" or "Sensio\Bundle\GeneratorBundle\Generator\Generator"? in /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/getGeneratorService.php:8 Stack trace: #0 /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/EccubeDevDebugProjectContainer.php(2267): require() #1 /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/getGenerateDummyDataCommandService.php(11): ContainerHjlmhhm\EccubeDevDebugProjectContainer->load('getGeneratorSer...') #2 /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/EccubeDevDebugProjectContainer.php(2267): require('/Users/XXXXXX...') #3 /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/getConsole_CommandLoaderService.php(24): ContainerHjlmhhm\EccubeDevDebugProjectContainer->load('getGenerateDumm...') #4 /Users/ in /Users/XXXXXX/project/XXXXXX/var/cache/dev/ContainerHjlmhhm/getGeneratorService.php on line 8 |
balisys |
投稿日時: 2020/8/24 12:10
対応状況: −−−
|
仙人 登録日: 2020/7/5 居住地: 投稿: 397 |
Re: bin/consoleコマンドが実行できない 参考に
https://github.com/EC-CUBE/ec-cube/issues/3944 > APP_ENV=dev時、Generatorのサービス定義を行っているが、パッケージ版にはtests以下のコードは同梱されないため。 まず、パッケージ版の利用でしょうか https://github.com/EC-CUBE/ec-cube 本体開発元からtests/以下を用意する必要があるかも知れません |
kenshi |
投稿日時: 2020/8/25 13:42
対応状況: −−−
|
一人前 登録日: 2020/6/29 居住地: 投稿: 83 |
Re: bin/consoleコマンドが実行できない balisys様
ありがとうございます。 すいません、パッケージ版の違いがわかりません。 公式より、https://www.ec-cube.net/download/ 最新版のzipをダウンロードし使用しています。 tests/を設置したら進みました。 https://doc4.ec-cube.net/customize_symfony There are no commands defined in the "customize" namespace. 新しいエラーが出てしまいました。 キャッシュクリアしても変わらずです。 |
kenshi |
投稿日時: 2020/8/25 15:52
対応状況: −−−
|
一人前 登録日: 2020/6/29 居住地: 投稿: 83 |
Re: bin/consoleコマンドが実行できない ■検証結果
作成ファイル:HelloCommand.php コマンド:bin/console acme:hello こちらのセットで問題なく実行できました。 原因はよくわかりませんが、作成ファイル名により左右されるようです。 ◯作成ファイル:TestCommand.php ◯作成ファイル:RemindMailCommand.php ×作成ファイル:RemindCommand.php |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |