wp-media / backwpup

BackWPup - WordPress Backup Plugin
https://backwpup.com
GNU General Public License v2.0
88 stars 36 forks source link

Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contract s\Translation\LocaleAwareInterface::getLocale(): #128

Open mtx-z opened 8 months ago

mtx-z commented 8 months ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug I'm getting and issue trying to upgrade my WordPress Sage 9 to PHP 8.1.2. Error disapears when I remove the backwpup plugin. It was working before I update my theme composer.json to the following. It may be related to "illuminate/support": "^8.0" update.

Fatal error: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contract
s\Translation\LocaleAwareInterface::getLocale(): string in C:\laragon\www\wp\wp-content\plugins\backwpup\vendor\symfony
\translation\TranslatorInterface.php on line 69

My composer.json

"require": {
    "php": ">=7.1|^8.1",
    "composer/installers": "2.2.0 as 1.12.0",
    "illuminate/support": "^8.0",
    "roots/sage-lib": "dev-master",
    "soberwp/controller": "~2.1.0",
    "guzzlehttp/guzzle": "^6.5",
    "nesbot/carbon": "2.71 as 1.25",
    "symfony/var-dumper": "^4.3",
    "wp-bootstrap/wp-bootstrap-navwalker": "^4.2",
    "sentry/sdk": "^3.0",
    "jenssegers/agent": "^2.6"
  },
  "require-dev": {
    "squizlabs/php_codesniffer": "^2.8.0",
    "roots/sage-installer": "dev-master"
  },