一、问题描述
1、环境
php:7.4.1
mac:10.13.6
laravel:6.0
2、报错:
Symfony\Component\Debug\Exception\FatalErrorException
Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)

二、解决
1、修改composer.json中的symfony/translation版本为4.3.8

2、执行composer update,执行成功访问解决了

网友评论