php - 运行 php artisan cache:clear Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) 后出现错误
问题描述
运行后php artisan cache:clear
我收到错误:
Symfony\Component\Translation\TranslatorInterface::setLocale($locale) 的声明必须与 Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) 兼容
解决方案
我有同样的错误
我通过添加解决了
"symfony/translation": "4.3.8"
到我的 composer.json 文件
然后运行
composer update
之后一切都很好
推荐阅读
- typescript - TypeScript array.map 允许附加返回类型的属性
- java - 如何在我想使用 PowerMock 测试的模拟抽象类中存根父类方法调用
- api - 适用于企业的 Bitbucket Rest API 2.0
- c++ - 带有 decltype 返回的模板扣除/替换错误
- mysql - MySQL 中的聚集索引
- postgresql - 我可以将 AWS AppSync 与自托管 PostgreSQL 一起使用吗?
- php - 通过 php 服务器提供的图像名称中的变音符号 (äöü)
- python-3.x - 为 urllib 提供一个列表并将结果输出到单个文件
- sql - 如何使用 sql 查询基于逻辑获取输出列
- hibernate - 具有多个实例的应用程序上的 JPA PESSIMISTIC_WRITE