1111
1212namespace Vonage ;
1313
14+ use Composer \InstalledVersions ;
1415use Http \Client \HttpClient ;
1516use InvalidArgumentException ;
1617use Laminas \Diactoros \Request ;
1718use Laminas \Diactoros \Uri ;
1819use Lcobucci \JWT \Token ;
19- use PackageVersions \Versions ;
2020use Psr \Container \ContainerInterface ;
2121use Psr \Http \Client \ClientExceptionInterface ;
2222use Psr \Http \Client \ClientInterface ;
5555use Vonage \Verify \Verification ;
5656use Vonage \Voice \ClientFactory as VoiceClientFactory ;
5757use Vonage \Logger \{LoggerAwareInterface , LoggerTrait };
58- use Vonage \Message \Client as MessageClient ;
5958
6059use function array_key_exists ;
6160use function array_merge ;
6261use function call_user_func_array ;
63- use function get_class ;
6462use function http_build_query ;
6563use function implode ;
6664use function is_null ;
@@ -129,12 +127,12 @@ class Client implements LoggerAwareInterface
129127 * @var array
130128 */
131129 protected $ options = ['show_deprecations ' => false , 'debug ' => false ];
132-
130+
133131 /**
134132 * @string
135133 */
136134 public $ apiUrl ;
137-
135+
138136 /**
139137 * @string
140138 */
@@ -148,7 +146,7 @@ public function __construct(CredentialsInterface $credentials, $options = [], ?C
148146 if (is_null ($ client )) {
149147 // Since the user did not pass a client, try and make a client
150148 // using the Guzzle 6 adapter or Guzzle 7 (depending on availability)
151- list ($ guzzleVersion ) = explode ('@ ' , Versions ::getVersion ('guzzlehttp/guzzle ' ), 1 );
149+ list ($ guzzleVersion ) = explode ('@ ' , InstalledVersions ::getVersion ('guzzlehttp/guzzle ' ), 1 );
152150 $ guzzleVersion = (float ) $ guzzleVersion ;
153151
154152 if ($ guzzleVersion >= 6.0 && $ guzzleVersion < 7 ) {
@@ -206,8 +204,6 @@ public function __construct(CredentialsInterface $credentials, $options = [], ?C
206204 $ this ->setFactory (
207205 new MapFactory (
208206 [
209- // Legacy namespace (used by Laravel, needs to be moved over in future
210- 'message ' => MessageClient::class,
211207 // Registered Services by name
212208 'account ' => ClientFactory::class,
213209 'applications ' => ApplicationClientFactory::class,
0 commit comments