Closed recanman closed 10 months ago
Ideally, Guzzle should not be in require
. Instead, the PSR interfaces should be required:
"psr/http-client-implementation": "*",
"psr/http-factory-implementation": "*"
And Guzzle passed in in the constructor
/**
* Constructor
*
* @param RequestFactoryInterface $requestFactory
* @param ClientInterface $client A PSR HTTP client.
*/
public function __construct(RequestFactoryInterface $requestFactory, ClientInterface $client, ...
E.g. for WordPress plugins, I don't use Guzzle, I use a PSR library that builds on WordPress's Requests library.
This also allows for easier testing.
Closing in favor of merging refring's repository, which has a new structure.
This does break compatibility with other daemon RPC methods, so I am leaving it as a draft for now. It is very simple to fix and make it compatible with the other methods, but I will not, as I am waiting to port the classes to PHP 8.
This also adds
composer.lock
, which for some reason, is not included.Closes #81, #92