问题描述
我正在尝试运行PHP artisan make:auth并得到找不到make:provide命令的错误。然后,我尝试使用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
我看过有关运行sudo-apt get install PHP命令的文章,但是我使用的是Mac,并且已经安装了Home-brew,但不确定如何运行等效命令。我认为版本之间不匹配,但我似乎无法解决
我的composer.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');\""
]
}
}
解决方法
流明必须仅用于创建API。您可以在此处使用用户界面。记住流明的工匠并不完整。不允许使用某些命令。记住,流明中的所有交互都是针对HTTP协议的。 流明中的身份验证工作略有不同:https://lumen.laravel.com/docs/7.x/authentication
, 具有给定版本要求的 laravel/socialite
将安装v3.4.0。这仅与Laravel 5.4兼容。
另一方面,具有给定要求的laravel/lumen-framework
将安装从v7.0.0开始的任何版本。这仅与Laravel 7兼容。
您应该降级laravel/lumen-framework
(我不建议这样做,因为这只会推迟进一步的问题),或者将laravel/socialite
至少升级到v4.2,这是该软件包的第一个版本与Laravel 7兼容