简体   繁体   English

composer 需要 laravel/ui 不适用于 php artisan make:auth in Lumen

[英]composer require laravel/ui not working for php artisan make:auth in Lumen

I am trying to run php artisan make:auth and get the error that make:provide command not found.我正在尝试运行 php artisan make:auth 并得到 make:provide command not found 的错误。 I then tried to use the composer require larval/ui command but got an error saying然后我尝试使用 composer require larval/ui 命令,但出现错误提示

 illuminate/support v5.8.9 requires doctrine/inflector ^1.1 -> satisfiable by doctrine/inflector[1.1.x-dev, 1.2.x-dev, 1.3.1, 1.3.x-dev, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.x-dev, v1.1.0, v1.2.0, v1.3.0].
    - Can only install one of: doctrine/inflector[1.4.0, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.1, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.2, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.3, 2.0.3].
    - Can only install one of: doctrine/inflector[1.4.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.0.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.1.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.2.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[1.3.1, 2.0.3].
    - Can only install one of: doctrine/inflector[1.3.x-dev, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.0.1, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.1.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.2.0, 2.0.3].
    - Can only install one of: doctrine/inflector[v1.3.0, 2.0.3].
    - Installation request for doctrine/inflector (locked at 2.0.3) -> satisfiable by doctrine/inflector[2.0.3].
reverting composer.json back to its orginal contents

I have seen posts about running the sudo-apt get install php command but I am using a Mac and have installed home-brew but not sure how to run the equivalent command.我看过有关运行 sudo-apt get install php 命令的帖子,但我使用的是 Mac 并安装了 home-brew 但不确定如何运行等效命令。 I assume there is a mismatch between versions but I cannot seem to resolve it我认为版本之间存在不匹配,但我似乎无法解决它

My composer.json:我的作曲家.json:

 "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.2.5",
        "laravel/lumen-framework": "^7.0",
        "facebook/graph-sdk": "^5.6",
        "laravel/socialite": "^3.0"
    },
    "require-dev": {
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "phpunit/phpunit": "^8.5"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ]
    }
}

Lumen must be used only to create APIs. Lumen 只能用于创建 API。 You can use an user interface at this.您可以在此使用用户界面。 Remember artisan for Lumen is not complete.记住 Lumen 的工匠是不完整的。 Some commands isn't allowed.某些命令是不允许的。 Remember all the interaction in Lumen have be for HTTP protocol.请记住,Lumen 中的所有交互都是针对 HTTP 协议的。 The Authentication is work a little different in Lumen: https://lumen.laravel.com/docs/7.x/authentication身份验证在 Lumen 中的工作方式略有不同: https://lumen.laravel.com/docs/7.x/authentication

laravel/socialite with the given version requirement will install v3.4.0.具有给定版本要求的laravel/socialite将安装 v3.4.0。 This is only compatible with Laravel 5.4.这仅与 Laravel 5.4 兼容。

On the other hand, laravel/lumen-framework with the given requirement will install any version starting from v7.0.0.另一方面,具有给定要求的laravel/lumen-framework将安装从 v7.0.0 开始的任何版本。 This is only compatible with Laravel 7.这仅与 Laravel 7 兼容。

You should either downgrade laravel/lumen-framework (which I would not recommend, as this only postpones further problems), or upgrade laravel/socialite to at least v4.2, which is the first version of this package to be compatible with Laravel 7您应该降级laravel/lumen-framework (我不建议这样做,因为这只会推迟进一步的问题),或者将laravel/socialite升级到至少 v4.2,这是 package 的第一个版本,与 Laravel 7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM