Symfony \ Component \ Translation \ TranslatorInterface :: setLocale($ locale)的声明必须兼容

问题描述 投票:0回答:1

当我做作曲家更新我的laravel项目时并且在运行任何api后都会出现此错误

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

这是我的composer.json文件

"require": {
        "php": "^7.1.3",
        "astrotomic/laravel-translatable": "^11.1",
        "bensampo/laravel-enum": "^1.26",
        "brozot/laravel-fcm": "^1.3",
        "doctrine/dbal": "^2.9",
        "fideloper/proxy": "^4.0",
        "intervention/image": "^2.5",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "mpociot/laravel-apidoc-generator": "^3.17",
        "nwidart/laravel-modules": "^5.0",
        "spatie/laravel-permission": "^2.37",
        "tymon/jwt-auth": "dev-develop"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.2",
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^7.5"
    },

这是我的php版本:

PHP 7.3.11-1+ubuntu16.04.1+deb.sury.org+1 
laravel laravel-5.8
1个回答
1
投票
Quick Google在Laravel存储库中将我带到了这个问题:https://github.com/laravel/framework/issues/30655#issuecomment-558619927
© www.soinside.com 2019 - 2024. All rights reserved.