Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with Guzzle #429

Open
bazalt opened this issue Aug 12, 2024 · 2 comments
Open

Conflict with Guzzle #429

bazalt opened this issue Aug 12, 2024 · 2 comments
Assignees

Comments

@bazalt
Copy link

bazalt commented Aug 12, 2024

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

@jokesterfr
Copy link
Contributor

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,

@jokesterfr jokesterfr self-assigned this Aug 28, 2024
@hschoenenberger
Copy link
Contributor

Hi @bazalt the latest 7.0.8 will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants