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
merged 1 commit into from Mar 23, 2020

Conversation

@trowski
Copy link
Contributor

trowski commented Mar 19, 2020

Q A
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

stof Mar 23, 2020

Member

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
@nicolas-grekas

This comment has been minimized.

Copy link
Member

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
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
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.