lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
419 stars 255 forks source link

Compile Error: Declaration of Lexik\Bundle\TranslationBundle\Translation\Loader\DatabaseLoader::load #415

Closed RobertIacoveciuc closed 2 years ago

RobertIacoveciuc commented 2 years ago

First time using the TranslationBundle and im unsure why this error occurs. I tried Updating the Package to the latest version and all of its dependencies but it does not solve it.

Here is the full error:

> HTTP 500 Internal Server Error Compile Error: Declaration of
> Lexik\Bundle\TranslationBundle\Translation\Loader\DatabaseLoader::load($resource,
> $locale, $domain = 'messages') must be compatible with
> Symfony\Component\Translation\Loader\LoaderInterface::load(mixed
> $resource, string $locale, string $domain = 'messages'):
> Symfony\Component\Translation\MessageCatalogue

Here is my composer file

 {
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "dev",
    "prefer-stable" : true,
    "require": {
        "php": "^8.1",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "ext-json": "*",
        "doctrine/annotations": "^1.0",
        "doctrine/doctrine-bundle": "^2.6",
        "doctrine/doctrine-migrations-bundle": "^3.2",
        "doctrine/orm": "^2.12",
        "easycorp/easyadmin-bundle": "*",
        "jms/serializer": "^3.12",
        "jms/serializer-bundle": "^3.9",
        "lexik/jwt-authentication-bundle": "^2.11",
        "lexik/translation-bundle": "*",
        "nelmio/api-doc-bundle": "^4.2",
        "nelmio/cors-bundle": "^2.1",
        "phpdocumentor/reflection-docblock": "^5.4",
        "phpstan/phpdoc-parser": "^1.4",
        "sensio/framework-extra-bundle": "^5.4",
        "symfony/asset": "5.4.*",
        "symfony/console": "5.4.*",
        "symfony/dotenv": "5.4.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "5.4.*",
        "symfony/framework-bundle": "5.4.*",
        "symfony/mailer": "5.4.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/property-access": "5.4.*",
        "symfony/property-info": "5.4.*",
        "symfony/proxy-manager-bridge": "5.4.*",
        "symfony/security-bundle": "5.4.*",
        "symfony/serializer": "5.4.*",
        "symfony/swiftmailer-bundle": "^3.5",
        "symfony/twig-bundle": "5.4.*",
        "symfony/validator": "5.4.*",
        "symfony/yaml": "5.4.*",
        "symfonycasts/reset-password-bundle": "^1.7",
        "vich/uploader-bundle": "^1.17"
    },
    "require-dev": {
        "phpunit/phpunit": "^9.5",
        "symfony/browser-kit": "5.4.*",
        "symfony/css-selector": "5.4.*",
        "symfony/debug-bundle": "5.4.*",
        "symfony/maker-bundle": "^1.0",
        "symfony/phpunit-bridge": "^5.2",
        "symfony/stopwatch": "5.4.*",
        "symfony/web-profiler-bundle": "5.4.*"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true,
        "secure-http": false,
        "allow-plugins": {
            "symfony/flex": true
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "5.4.*"
        }
    }
}

Would love to understand the full picture on why this is happening.

raziel057 commented 2 years ago

It should be fixed by PR https://github.com/lexik/LexikTranslationBundle/pull/413