Skip to content

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

@mtx-z

Description

@mtx-z

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

  • Version 4.0.1 / WP 6.3.2 / PHP 8.1.2 / Windows and Debian

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"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions