-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Replace php-http/message-factory to psr/http-factory, HttpClientDiscovery to Psr18ClientDiscovery, MessageFactoryDiscovery to Psr17FactoryDiscovery and Http\Client\HttpClient to Psr\Http\Client\ClientInterface #269
base: master
Are you sure you want to change the base?
Replace php-http/message-factory to psr/http-factory, HttpClientDiscovery to Psr18ClientDiscovery, MessageFactoryDiscovery to Psr17FactoryDiscovery and Http\Client\HttpClient to Psr\Http\Client\ClientInterface #269
Conversation
c71b5b8
to
2de52c7
Compare
2de52c7
to
8b1d990
Compare
…ctoryDiscovery to Psr17FactoryDiscovery and Http\Client\HttpClient to Psr\Http\Client\ClientInterface
6263bae
to
6c4b2b5
Compare
@barryvdh Can you give an estimate for review that, please ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure how to handle this BC-wise. If people supply their own Request Factory, it will now Break. So that requires a new major version..
) { | ||
$request = $this->requestFactory->createRequest($method, $uri, $headers, $body, $protocolVersion); | ||
$request = $this->requestFactory->createRequest($method, $uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. Can we not set the headers/body/protocol on the request before sending?
array $headers = [], | ||
$body = null, | ||
$protocolVersion = '1.1' | ||
$uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a breaking change
*/ | ||
private $requestFactory; | ||
|
||
public function __construct($httpClient = null, RequestFactory $requestFactory = null) | ||
public function __construct($httpClient = null, RequestFactoryInterface $requestFactory = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So these are different interfaces, which would require significant BC break.
@barryvdh So it sounds like a new major version is required? Is there any reason not to do one? I know these things are just interfaces so not like a security risk, but folks auditing my dependencies don't know that. It'd be good to get this fixed. |
No description provided.