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

[HttpClient] Issue notice when NativeHttpClient is used #36137

merged 1 commit into from Mar 23, 2020


Copy link

trowski commented Mar 19, 2020

Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

Simple PR to issue a notice to notify the user that ext-curl or amphp/http-client should be installed to use an HTTP/2 capable HTTP client. Not sure on the notice wording.

@trowski trowski force-pushed the trowski:native-client-notice branch from f887975 to 720501c Mar 19, 2020
@@ -61,6 +61,8 @@ public static function create(array $defaultOptions = [], int $maxHostConnection
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);

@trigger_error(($curl ? 'Upgrade' : 'Install').' the curl extension or run "composer require amphp/http-client" to perform async HTTP operations, including full HTTP/2 support', E_USER_NOTICE);

This comment has been minimized.

Copy link

stof Mar 23, 2020


instead of using a variable, I would put \extension_loaded('curl') inline again. That function call is resolved at compile-time by OPCache, but the variable value is not.

@nicolas-grekas nicolas-grekas force-pushed the trowski:native-client-notice branch from 720501c to 874c1e6 Mar 23, 2020

This comment has been minimized.

Copy link

nicolas-grekas commented Mar 23, 2020

Thank you @trowski.

@nicolas-grekas nicolas-grekas merged commit 3afe198 into symfony:master Mar 23, 2020
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details Your code looks good.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.