PrestaShopCorp/ps_accounts

Conflict with Guzzle

bazalt opened this issue · 2 comments

Hello,

I encounter PHP exceptions during the process of linking a Prestashop Account within Prestashop Checkout module:

{
    "type": "https:\/\/tools.ietf.org\/html\/rfc2616#section-10",
    "title": "An error occurred",
    "status": 500,
    "detail": "Compile Error: Declaration of PrestaShop\\Module\\PsAccounts\\Vendor\\GuzzleHttp\\Psr7\\Request::getRequestTarget() must be compatible with Psr\\Http\\Message\\RequestInterface::getRequestTarget(): string",
    "class": "Symfony\\Component\\ErrorHandler\\Error\\FatalError",
    "trace": [
        {
            "namespace": "",
            "short_class": "",
            "class": "",
            "type": "",
            "function": "",
            "file": "[xxxxxxx]\/modules\/ps_accounts\/vendor\/guzzlehttp\/psr7\/src\/Request.php",
            "line": 45,
            "args": []
        }
    ]
}

As you can see, the error is thrown from ps_accounts module.

This occurs on a Prestashop v8.1.1.
I guess this is messing with Guzzle version present at the root of the PS at /vendor/guzzlehttp/psr7/src/Request.php?

I don't know exactly which version of Guzzle is bundled with PS 8.1.1 ; composer.lock indicates "guzzlehttp/guzzle": "^6.0 || ^7.0".

Do you have a workaround to get rid of this error?
Thank you

Hi @bazalt, thank you for reaching out!
What version of ps_accounts are you using? Can you try uninstalling the modules (with sources) and installing them back again?

We are aware of composer dependencies cannibalism (one module would impose its dependency vendor to another) and try to mitigate such issues with php-scoper (https://github.com/humbug/php-scoper).

Work is still ongoing to extend the scoping to the whole package, but PrestaShop Account 7.1.7 should already solve issues of this kind.

Please let me know,

Hi @bazalt the latest 7.0.8 will fix this.