Symfony\Component\Debug\Exception\FatalErrorException

Laravel6构建项目报错

Symfony\Component\Debug\Exception\FatalErrorException
Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) must be 
compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)

解决办法
在项目目录修改composer.json文件
增加如下代码
"symfony/translation-contracts": "^1.1.6"

在这里插入图片描述
保存退出执行下面命令

composer update
composer dump-autoload

原创文章 134 获赞 9 访问量 8766

猜你喜欢

转载自blog.csdn.net/weixin_45143481/article/details/105272303
今日推荐