Skip to content

Commit a500eb1

Browse files
trowskinicolas-grekas
authored andcommitted
[HttpClient] Issue notice when NativeHttpClient is used
1 parent 3fc5736 commit a500eb1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

HttpClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public static function create(array $defaultOptions = [], int $maxHostConnection
6161
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);
6262
}
6363

64+
@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);
65+
6466
return new NativeHttpClient($defaultOptions, $maxHostConnections);
6567
}
6668

0 commit comments

Comments
 (0)