Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] fix exception in case of PSR17 discovery failure#35245
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedJan 7, 2020
Hum, actually the message says This is a mess, sorry :) |
nicolas-grekas commentedJan 7, 2020
Reopening, the message is still better. |
Nyholm left a comment
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.
I agree that this message is better and more helpful.
fabpot commentedJan 7, 2020
Thank you@nicolas-grekas. |
…ure (nicolas-grekas)This PR was merged into the 4.4 branch.Discussion----------[HttpClient] fix exception in case of PSR17 discovery failure| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -On symfony.com, we need to use HTTPlug for 3rd party libs. When `nyholm/psr7` is not installed, we currently see an exception saying `No HTTPlug clients found.` from `HttpClientDiscovery`.This fixes the message by correctly suggesting `nyholm/psr7` instead, since there *is* an HTTPlug client: `HttplugClient` from our HttpClient component.It's quite unfortunate that `guzzle/psr7` provides no PSR17 factory yet, because that would have solved some part of this deps mess. /cc@Nyholm@sagikazarmark FYINote thathttps://packagist.org/providers/psr/http-factory-implementation lists `guzzle/psr7` but this is a wrong solution: no tagged release of it is PSR17-compatible, which means installing it doesn't solve the issue.Commits-------96e70a4 [HttpClient] fix exception in case of PSR17 discovery failure
On symfony.com, we need to use HTTPlug for 3rd party libs. When
nyholm/psr7is not installed, we currently see an exception sayingNo HTTPlug clients found.fromHttpClientDiscovery.This fixes the message by correctly suggesting
nyholm/psr7instead, since thereis an HTTPlug client:HttplugClientfrom our HttpClient component.It's quite unfortunate that
guzzle/psr7provides no PSR17 factory yet, because that would have solved some part of this deps mess. /cc@Nyholm@sagikazarmark FYINote thathttps://packagist.org/providers/psr/http-factory-implementation lists
guzzle/psr7but this is a wrong solution: no tagged release of it is PSR17-compatible, which means installing it doesn't solve the issue.