无法在 Laravel 8 全新安装时安装 Lighthouse

Unable to install Lighthouse on Laravel 8 fresh install

我全新安装了 Laravel 8,我正在尝试安装 Laravel Lighthouse,但 Lighthouse 似乎不支持最新的 Laravel 8 版本,但是有这个pull request说已经支持了

这是我尝试 运行 composer require nuwave/lighthouse:

时得到的结果
Problem 1
    - Conclusion: remove laravel/framework v8.5.0
    - Conclusion: don't install laravel/framework v8.5.0
    - nuwave/lighthouse 4.x-dev requires illuminate/validation 5.5.*, ... , v7.9.2].
    - nuwave/lighthouse v4.16.2 requires illuminate/validation 5.5.*, ... , v7.9.2].
    - don't install illuminate/validation 5.5.x-dev|don't install laravel/framework v8.5.0
    ...
    - don't install illuminate/validation v7.9.2|don't install laravel/framework v8.5.0
    - Installation request for laravel/framework (locked at v8.5.0, required as ^8.5) -> satisfiable by laravel/framework[v8.5.0].
    - Installation request for nuwave/lighthouse ^4.16 -> satisfiable by nuwave/lighthouse[4.x-dev, v4.16.0, v4.16.1, v4.16.2, v4.16.3].


Installation failed, reverting ./composer.json to its original content.

我做错了什么?

我的composer.json:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.5",
        "laravel/tinker": "^2.0"
    },
    "require-dev": {
        "facade/ignition": "^2.3.6",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3"
    }
}

使用dev-master版本

composer require nuwave/lighthouse "dev-master"

如果 Mohammad Javad Ghasemy 的回答对您不起作用,运行

composer require 'nuwave/lighthouse:*'