Skip to content

Commit 7aef21e

Browse files
Improve backwards compatibility to PHP 7.4
1 parent a16fbbf commit 7aef21e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/PackagistAPI.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public function getPackageInfo(string $package): array
2727
try {
2828
$response = $this->http_client->request('GET', "https://repo.packagist.org/packages/{$package}.json");
2929
return json_decode($response->getBody()->getContents(), true) ?? [];
30-
31-
} catch (GuzzleException) {
30+
} catch (GuzzleException $e) {
3231
fwrite($this->stderr, "Could not find info for {$package} on Packagist\n");
3332
return [];
3433
}

0 commit comments

Comments
 (0)