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

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

FaboPT
Copy link

@FaboPT FaboPT commented Apr 15, 2024

No description provided.

@FaboPT FaboPT changed the title chore: Replace php-http/message-factory to psr/http-factory Replace php-http/message-factory to psr/http-factory Apr 15, 2024
@FaboPT FaboPT force-pushed the replace-php-http/message-factory branch from c71b5b8 to 2de52c7 Compare April 15, 2024 12:23
@FaboPT FaboPT force-pushed the replace-php-http/message-factory branch from 2de52c7 to 8b1d990 Compare April 15, 2024 12:23
…ctoryDiscovery to Psr17FactoryDiscovery and Http\Client\HttpClient to Psr\Http\Client\ClientInterface
@FaboPT FaboPT changed the title Replace php-http/message-factory to psr/http-factory Replace php-http/message-factory to psr/http-factory, HttpClientDiscovery to Psr18ClientDiscovery, MessageFactoryDiscovery to Psr17FactoryDiscovery and Http\Client\HttpClient to Psr\Http\Client\ClientInterface Apr 15, 2024
@FaboPT FaboPT force-pushed the replace-php-http/message-factory branch from 6263bae to 6c4b2b5 Compare April 15, 2024 15:37
@FaboPT
Copy link
Author

FaboPT commented Apr 30, 2024

@barryvdh Can you give an estimate for review that, please ?

Copy link
Member

@barryvdh barryvdh left a 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);
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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.

@kynx
Copy link

kynx commented Sep 12, 2024

@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.

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

Successfully merging this pull request may close these issues.

3 participants