Diagnosing the GET http://cabinet.laravel.com/latest.zip Timeout
When you execute laravel new blog, you expect a clean installation of the framework skeleton. Instead, if you are seeing an error trace pointing to RequestException.php line 113 with a status code of 522 Origin Connection Time-out, the issue is almost certainly not within your local environment or your Composer installation. This specific error indicates that the CLI tool attempted to fetch the latest Laravel release from the official distribution server but failed to establish a connection in time.
The stack trace explicitly references http://cabinet.laravel.com/latest.zip. A 522 error is an HTTP status code returned by Cloudflare, the content delivery network (CDN) that protects many major services, including laravel.com. It signifies that the origin serverâthe actual web server hosting the .zip fileâdid not respond to the request within the timeout window defined by the CDN. When you attempt to navigate directly to that URL in a browser and receive the same truncated HTML page containing <h1>522 Origin Conne, it confirms that the failure is occurring at the network level between your DNS resolver, Cloudflare's edge nodes, and Laravel's origin infrastructure.
It is important to understand why running composer create-project --prefer-dist laravel/laravel blog yields the same result. The laravel new command is essentially a thin wrapper around Composer that automatically updates dependencies and fetches the latest stable version of the framework. Under the hood, both commands rely on the same distribution mechanism when using --prefer-dist. This flag tells Composer to download pre-built archives (the .zip files) rather than cloning the source repository and running composer install. The process initiates a request for laravel/laravel:latest, which resolves to the asset hosted at the cabinet URL. If that endpoint is unreachable or overwhelmed, Composer cannot proceed with the installation regardless of how you invoke it.
This scenario often arises during periods of high traffic on Laravel's official servers or when Cloudflare experiences regional routing issues. Because the error originates from the distribution server rather than your local machine, standard troubleshooting steps like clearing Composer caches (composer clear-cache) or updating Composer itself will not resolve the immediate inability to download the archive.
Given that the root cause is a temporary outage or connectivity issue with the upstream source, the most pragmatic solution is to wait for the service to restore normal operation. However, if you are in an urgent situation and cannot wait for the official servers to recover, you can bypass the automatic latest-version check by specifying a known-good version tag directly in the command.
By replacing laravel/laravel with a specific version, such as laravel/laravel:^11.0, you force Composer to resolve that specific release from its internal repository cache or a different distribution path if available, rather than hitting the /latest.zip endpoint which is currently failing. The command would look like this:
composer create-project --prefer-dist laravel/laravel:^11.0 blog
This approach trades the convenience of always getting the absolute newest code for guaranteed stability during an outage. Once the cabinet.laravel.com endpoints resume responding to requests, you can revert to using the generic laravel new command or omitting the version constraint entirely to ensure you are installing the most recent patch releases automatically.
If this error persists beyond a few hours of normal business operations, it may indicate a broader issue with the distribution infrastructure rather than a transient network glitch. In such cases, monitoring Laravel's official status pages or social channels for outage reports is advisable before assuming your local configuration is at fault.
