From 874c1e6ab07df9166fc6edcdde9ba090e3db93fc Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Wed, 18 Mar 2020 21:46:30 -0500 Subject: [PATCH] [HttpClient] Issue notice when NativeHttpClient is used --- src/Symfony/Component/HttpClient/HttpClient.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Component/HttpClient/HttpClient.php b/src/Symfony/Component/HttpClient/HttpClient.php index 405c18ce92..76031d7298 100644 --- a/src/Symfony/Component/HttpClient/HttpClient.php +++ b/src/Symfony/Component/HttpClient/HttpClient.php @@ -61,6 +61,8 @@ final class HttpClient return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes); } + @trigger_error((\extension_loaded('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); + return new NativeHttpClient($defaultOptions, $maxHostConnections); }