PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://packagist.org/packages/i-do/not-exist.json` resulted in a `404 Not Found` response:
{"status":"error","message":"Package not found"}
In 2.x-dev it throws an InvalidArgumentException:
PHP Fatal error: Uncaught InvalidArgumentException: Invalid input data. in .../src/Packagist/Api/Result/Factory.php:56
We can throw a specific exception when we encounter this, which devs can use to detect a 404 on packages.
Test script:
In v1.7.2 running this throws a Guzzle exception:
In 2.x-dev it throws an InvalidArgumentException:
We can throw a specific exception when we encounter this, which devs can use to detect a 404 on packages.