Ranjeet
Ranjeet

Reputation: 579

Getting error after running php artisan cache:clear Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale)

After running php artisan cache:clear

I am getting error:

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

Upvotes: 1

Views: 3810

Answers (3)

mallah
mallah

Reputation: 185

i got the same error

i solved it by add

"symfony/translation": "4.3.8"

to my composer.json file

and then run composer update

every thing work good after that

Upvotes: 3

hakhiste
hakhiste

Reputation: 123

Do below changes-

  1. "symfony/translation": "4.3.8" in your composer.json,
  2. run composer update

Upvotes: 1

Udhav Sarvaiya
Udhav Sarvaiya

Reputation: 10091

PHP version (7.1) has been unsupported for 11 days ago(1 Dec 2019) : LINK

Solution: Update your PHP with the latest version

Upvotes: 1

Related Questions