我正在接管一個巨大的現有項目。現在我正在追求一些錯誤。 但是,當symfony緩存到處都是外國代碼很難理解的。禁用symfony緩存/ appDevDebugProjectContainer.php怪物
Quit the server with CONTROL-C.
RUN '/usr/bin/php' '-S' '127.0.0.1:8000' '/Users/kb1/php/default/projectname/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php'
ERR [Thu Dec 17 10:13:08 2015] PHP Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InvalidArgumentException' with message 'The parameter "youtube_client_id" must be defined.' in /Users/kb1/php/default/projectname/app/cache/dev/appDevDebugProjectContainer.php:4718
ERR Stack trace:
ERR #0 /Users/kb1/php/default/projectname/src/InfluencerBundle/Service/YouTube.php(74): appDevDebugProjectContainer->getParameter('youtube_client_...')
ERR #1 /Users/kb1/php/default/projectname/src/InfluencerBundle/Service/YouTube.php(56): InfluencerBundle\Service\YouTube->setConfigParams()
ERR #2 /Users/kb1/php/default/projectname/app/cache/dev/appDevDebugProjectContainer.php(4275): InfluencerBundle\Service\YouTube->__construct(Object(appDevDebugProjectContainer))
ERR #3 /Users/kb1/php/default/projectname/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(305): appDevDebugProjectContainer->getYoutubeServiceService()
ERR #4 /Users/kb1/php/default/projectname/app/cache/dev/appDevDebugProjectContainer.php(3937): Symfony\Component\DependencyInjection\Container->get in /Users/kb1/php/default/projectname/app/cache/dev/appDevDebugProjectContainer.php on line 4718
問題是,幾乎每一個方法就是在這個巨大的5000 LOC appDevDebugProjectContainer.php集裝箱。
已歷經試圖Disabling the Bootstrap File and Class Caching¶ 雖然used autoload.php and not bootstrap.php.cache
這是我app_dev.php:
$loader = require_once __DIR__ . '/../app/autoload.php';
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
// $kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
謝謝,是的 - 我知道。我不是在尋找這個特定的錯誤,而是試圖通過現有的(大)代碼庫。 –