Error : Interface 'Psr\Http\Client\ClientInterface' not found
scottw-finao opened this issue · comments
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)
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)