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

Error : Interface 'Psr\Http\Client\ClientInterface' not found #33

Open
scottw-finao opened this issue Feb 17, 2023 · 2 comments
Open

Error : Interface 'Psr\Http\Client\ClientInterface' not found #33

scottw-finao opened this issue Feb 17, 2023 · 2 comments

Comments

@scottw-finao
Copy link

I'm getting Error : Interface 'Psr\Http\Client\ClientInterface' not found

I can see the requirements in various package for psr/httpd-client v1.0 but I don't seem to be getting a vendor/psr/httpd-client installed with composer.

With a little digging, it may to be related to an older version of php-http/socket-client that breaks in composer 2? I tried putting a direct entry in to force php-http/socket-client to v1.1 but then it says your ClientInterface usage is incompatible.

I tried adding a direct requirement for psr/httpd-client to my own composer but it still doesn't seem to install it. (i've tried dump-autoload, nuking the lock file and the entire vendor folder - i even installed psr/httpd-client into another temporary directory, copying it to /vendor and doing composer dump-autoload. Still no glory. Not sure how to fix it locally - not sure what needs to be done to fix it in your stuff)

@scottw-finao
Copy link
Author

scottw-finao commented Feb 17, 2023

ok, with a little more playing I was able to get it working in my implementation by adding:

"php-http/socket-client": "1.*",

... in my composer.json. So perhaps changing our composer.json to require 1.* instead of *
(using the latest 2.1.1 or similar would break your interface implementation as mentioned above)

@gengyangabc123
Copy link

Can you upgrade the client

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

2 participants