InteractsWithVersions::getLatestVersion() calls file_get_contents() against Packagist with no timeout and no error handling:
$package = json_decode(file_get_contents(
'https://packagist.org/p2/laravel/forge-cli.json'
), true);
If Packagist is unreachable or slow, the CLI hangs indefinitely. There's also no handling for file_get_contents returning false.
Should add a timeout and a try-catch that falls back to the current version.
InteractsWithVersions::getLatestVersion()callsfile_get_contents()against Packagist with no timeout and no error handling:If Packagist is unreachable or slow, the CLI hangs indefinitely. There's also no handling for
file_get_contentsreturningfalse.Should add a timeout and a try-catch that falls back to the current version.