Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found

你说的曾经没有我的故事 提交于 2021-01-28 12:40:01

问题


After upgrading from Symfony 2.3 to 2.8 I get the following error:

Fatal error: Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found in app/bootstrap.php.cache on line 2629

Already tried removing the vendor folder and doing a composer install.

Any ideas?


回答1:


Have you tried removing cached code? It seems like you've procompiled your application into one file bootstrap.php.cache. Have you tried removing it.

Otherwise it is always a good idea to do two of the following commands:

php composer.phar dump-autoload - update autolod file
php app/console cache:clear - removes cache




回答2:


I had to add the following line to web/app.php and web/app_dev.php:

$loader = require __DIR__.'/../app/autoload.php';

And also update app/console.

Found this by comparing my files with a fresh install of Symfony 2.8



来源:https://stackoverflow.com/questions/34315629/interface-symfony-component-httpkernel-httpkernelinterface-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!