2016-12-15 10 views
1

config_test.ymlとparameters_test.ymlを "config_localtest.yml"と "parameters_localtest.yml"にコピーしました。 その後、config_localtest.ymlのインクルードをparameters_test.ymlからparameters_localtest.ymlに変更します。その小さな変更の他に、ファイルは同一です。コピーしたsymfony2の設定を使用できません

- 私は

bin/console cache:clear --env="test" 

を行うときすべてが前のように働いています。私は新しい設定

bin/console cache:clear --env="localtest" 

のために同じことをするだろう場合はエラーがスローされます。

There is no extension able to load the configuration for "web_profiler" (in /var/www/.../htdocs/app/config/config_localtest.yml). Looked for namespace "web_profiler", found "framework", "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "and all other ..." 

私はすでに手動でキャッシュを削除していない - 他の結果を。 他に何を試してみるべきですか?

答えて

1

symfonyは私はあなたがAppKernel(アプリ/ AppKernel.php)内部localtestが欠けていると思う コンフィグので、あなたのためのバンドルを見つける見つけることができません それはそうlocaltestを追加し、この

if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { 
    $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 
} 

のような行を持っています['dev', 'test']内側とそれが動作するはず細かい

+0

私に面倒!ありがとう! – develth

0

あなたはweb_profilerためのconfigure欠けているように思える:

# config_localtest.yml 
web_profiler: 
    toolbar: true 
    intercept_redirects: false 
を0

config_localtest.ymlファイルに上記3行の設定を追加してください。

関連する問題