安装 laravel breeze 时如何解决 "illuminate/filesystem conflicting version" 的问题?

How can i fix problem of "illuminate/filesystem conflicting version" while installing laravel breeze?

我正在尝试安装 Laravel breeze 但遇到此错误:

$ composer require laravel/breeze --dev
Using version ^1.2 for laravel/breeze
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/breeze[v1.2.0, ..., 1.x-dev] require illuminate/filesystem ^8.42 -> found illuminate/filesystem[v8.42.0, v8.42.1, 8.x-dev] but it conflicts with another require.
    - Root composer.json requires laravel/breeze ^1.2 -> satisfiable by laravel/breeze[v1.2.0, 1.x-dev].


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

这是我的 composer.json(即 laravel 的全新安装):

"require": {
        "php": "^7.3|^8.0",
        "doctrine/dbal": "^3.1",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.40",
        "laravel/tinker": "^2.5"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },

谁能帮帮我?

您可以使用 --with-dependencies--with-all-dependencies 命令告诉作曲家更新与目标包要求冲突的包。 Read more

因此,您可以告诉 composer 更新您的包以解决冲突。

composer require laravel/breeze --dev -w