qcod/laravel-app-settings

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

MuhammadAdeelAhmad opened this issue · 5 comments

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

this error display after installtaion package and when we remove string then come more issues

can you share laravel and package version so I can debug it. must be some breaking change

Laravel Framework 5.8.35
Latest Version on Packagist :v1.2.0
app-setting-issue solution2
i resolve issue from edit this file by removing string from all parameters.

You should not edit a file under vendors/ folder. check this might help laravel/framework#30655

yes should not edit, but i can't resolve issue without it,
how resolve without this editing?

yes should not edit, but i can't resolve issue without it,
how resolve without this editing?

This issue is solved by downgrading the offending package to a previously known working version.

Run composer require symfony/translation:4.3.8 from the command line, to downgrade the package, which should fix the error.

You should never edit anything inside the vendor directory. Composer is supposed to have 100% control over it. If you ever encounter an issue like this in the future (with any project), there are a few options.

The easiest is just to downgrade a version until it's resolved.

If there are no versions, try to install a specific branch.

You can fork the repo/package, fix the bug, and force Composer to use your forked version instead.

You could clone it locally If you only need to get by for a couple of days and are working locally. You would use the symbolic link method in Composer.