分享 / 0 / 3 / 创建于 4年前 / 更新于 4年前
Linux线上部署报错vendor/symfony/translation/TranslatorInterface.php,是什么原因
检查线上php版本是否符合translation包的要求
这里说的是,前面没有实现后者,仔细看,后者参数有一个 string 类型限制。至于为什么,有可能是包有 bug,因为这个代码看起来应该是在包里的。
这个报错的意思是Symfony\Component\Translation\TranslatorInterface::setLocale($locale)这个方法声明与Symfony\Contracts\Translation|localeAwareInterface::setLocale(string $locale)方法声明不匹配,这两货都是接口,TranslatorInterface继承自localeAwareInterface,而子类接口与父类接口的同名方法声明必须完全一致,而TranslatorInterface的setLocale方法很明显少了string的类型声明。解决方案:github.com/symfony/symfony/issues/...github.com/laravel/framework/issue...
我要举报该,理由是:
检查线上php版本是否符合translation包的要求
这里说的是,前面没有实现后者,仔细看,后者参数有一个 string 类型限制。至于为什么,有可能是包有 bug,因为这个代码看起来应该是在包里的。
这个报错的意思是Symfony\Component\Translation\TranslatorInterface::setLocale($locale)这个方法声明与Symfony\Contracts\Translation|localeAwareInterface::setLocale(string $locale)方法声明不匹配,这两货都是接口,TranslatorInterface继承自localeAwareInterface,而子类接口与父类接口的同名方法声明必须完全一致,而TranslatorInterface的setLocale方法很明显少了string的类型声明。解决方案:
github.com/symfony/symfony/issues/...
github.com/laravel/framework/issue...