私はsymfony 3.2.1アプリケーションでブログを作成するバンドルを追加したいと思います。 私はそれを生成せずにバンドルを作成しようとしましたので、デフォルトの "AppBundle"と同じ構造を再現しました: "src"に "BlogBundle"フォルダを作成し、その下に "BlogBundle.php "AppBundle.phpファイルと同じコードを含むファイル(名前の変更...)。私はそれをAppKernel.phpファイルで宣言しました。ClassNotFound on新しいSymfonyバンドル
しかし、私は自分のアプリで "ClassNotFound"を持っていました。 私はすべてを削除し、コンソールgenerate:bundle
スクリプトを使用します。
バンドルは、コードnew BlogBundle\BlogBundle()
エラー(アプリのdev.logファイルにエラーなし)でAppKernelで宣言されています
ClassNotFoundException in AppKernel.php line 41: Attempted to load class
"BlogBundle" from namespace "BlogBundle".
Did you forget a "use" statement for another namespace?
in AppKernel.php line 41
at AppKernel->registerBundles() in Kernel.php line 403
at Kernel->initializeBundles() in Kernel.php line 113
at Kernel->boot() in Kernel.php line 165
at Kernel->handle(object(Request)) in app_dev.php line 43
at require('/media/jon/Projets/Projets/heroDelHumanite/Sylius/boutique/web/app_dev.php') in router_dev.php line 40
`
誰かが問題のアイデアを持って?
ありがとうございます!
クラスのネームスペースを適切にしましたか?たぶん、あなたは 'コンポーザーダンプ自動ロード 'する必要があります。 – DanFromGermany
名前空間は 'generate:bundle'スクリプトによって生成されています。 src/BlogBundle/BlogBundle.phpの名前空間は 'namespace BlogBundle;' – wyllyjon
です。あなたの質問は実際のエラーメッセージで更新してください。別のクラスを完全に探している可能性はありますか?これは新しいS3アプリです。アップグレードされておらず、他に依存しないものがありますか? – Cerad