找不到接口“Symfony\Component\HttpKernel\HttpKernelInterface" [英] Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found

查看:68
本文介绍了找不到接口“Symfony\Component\HttpKernel\HttpKernelInterface"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Symfony 2.3 升级到 2.8 后,出现以下错误:

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

致命错误:接口找不到Symfony\Component\HttpKernel\HttpKernelInterface"app/bootstrap.php.cache 在线 2629

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

已经尝试删除 vendor 文件夹并安装 Composer.

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

有什么想法吗?

推荐答案

我必须在 web/app.php 和 web/app_dev.php 中添加以下行:

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.

通过将我的文件与全新安装的 Symfony 2.8 进行比较发现

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

这篇关于找不到接口“Symfony\Component\HttpKernel\HttpKernelInterface"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆