安装 Laravel Valet 时出现问题

问题描述

我正在尝试安装 Laravel Valet。

当我运行以下命令时: composer global 需要 laravel/valet --update-with-all-dependencies

它返回以下错误

Your requirements Could not be resolved to an installable set of packages.

 Problem 1
- laravel/installer is locked to version v4.0.5 and an update of this package was not requested.
- laravel/installer v4.0.5 requires PHP ^7.3 -> your PHP version (8.0.1) does not satisfy that requirement.


Installation Failed,reverting ./composer.json and ./composer.lock to their original content.

如果有人能帮我解决上述问题,我将不胜感激。

解决方法

这是因为在我写这篇文章的时候,Laravel 还不支持 PHP 8。 您可以在此处查看拉取请求, https://github.com/laravel/framework/pull/33388