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

Check if SymfonyHttplug actually implements HttpClient #253

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

arokettu
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #252
License MIT

What's in this PR?

When looking for HttpClient, check if SymfonyHttplug actually implements HttpClient.

Why?

In Symfony 7, SymfonyHttplug no longer implements HttpClient

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

@@ -158,6 +158,11 @@ public static function isGuzzleImplementingPsr18()
return defined('GuzzleHttp\ClientInterface::MAJOR_VERSION');
}

public static function isSymfonyImplementingHttpClient()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static function isSymfonyImplementingHttpClient()
public static function isSymfonyImplementingHttplug()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HttpAsyncClient is kinda Httplug too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree with @arokettu

its not going to be relevant forever, we deprecated the synchronous php-http HttpClient interface in favor of the PSR18 http client. only the async php-http client is still relevant. when we do a new major of discovery, we will drop discovering HttpClient.

Co-authored-by: Nicolas Grekas <[email protected]>
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for this one.

@dbu dbu merged commit bbb2b52 into php-http:1.x Nov 30, 2023
29 of 30 checks passed
@dbu
Copy link
Contributor

dbu commented Nov 30, 2023

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.

Symfony 7 no longer implements Http\Client\HttpClient
3 participants