laravel/passport laravel 流明支持
laravel/passport for laravel lumen support
目前我正在为 API 使用 laravel 流明版本 8,我想集成 laravel/passport
以获得 API 的 OAuth 授权,但是当我尝试安装laravel/passport
我收到以下错误,无法为项目安装 laravel/passport
。我尝试为 laravel/passport
安装 dusterio/lumen
库,但该软件包在 lumen 8 方面也存在一些问题。
Problem 1
- lcobucci/jwt[3.3.0, ..., 3.4.x-dev] require php ^5.6 || ^7.0 -> your php version (8.0.14) does not satisfy that requirement.
- lcobucci/jwt 4.0.0-alpha1 requires php ^7.1 -> your php version (8.0.14) does not satisfy that requirement.
- lcobucci/jwt[4.0.0-alpha2, ..., 4.0.0-alpha3] require php ^7.2 -> your php version (8.0.14) does not satisfy that requirement.
- Conclusion: don't install laravel/passport v10.3.2 (conflict analysis result)
- Root composer.json requires tymon/jwt-auth dev-develop -> satisfiable by tymon/jwt-auth[dev-develop].
- Root composer.json requires laravel/passport ^10.3 -> satisfiable by laravel/passport[v10.3.0, v10.3.1, v10.3.2, 10.x-dev].
- tymon/jwt-auth dev-develop requires lcobucci/jwt <3.4 -> satisfiable by lcobucci/jwt[1.0.0, 1.0.1, 1.0.2, 1.1.0, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.3.x-dev].
- You can only install one version of a package, so only one of these can be installed: lcobucci/jwt[1.0.0, 1.0.1, 1.0.2, 1.1.0, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.4.x-dev, 4.0.0-alpha1, ..., 4.2.x-dev].
- laravel/passport 10.x-dev requires lcobucci/jwt ^3.4|^4.0 -> satisfiable by lcobucci/jwt[3.4.0, ..., 3.4.x-dev, 4.0.0-alpha1, ..., 4.2.x-dev].
- Conclusion: don't install lcobucci/jwt 4.1.5 (conflict analysis result)
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/passport:*" to figure out if any version is installable, or "composer require laravel/passport:^2.1" if you know which you need.
以下是我项目的composer.json。
{
"require": {
"php": "^7.3|^8.0",
"dingo/api": "^3.0.0",
"doctrine/dbal": "^3.1",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0",
"illuminate/notifications": "^8.49",
"illuminate/redis": "^8.49",
"intervention/image": "^2.6",
"laravel-notification-channels/onesignal": "^2.3",
"laravel/lumen-framework": "^8.0",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "^3.1",
"pusher/pusher-php-server": "^7.0",
"simplesoftwareio/simple-qrcode": "^4.2",
"spatie/data-transfer-object": "^3.7",
"spatie/laravel-activitylog": "^4.4",
"spatie/laravel-permission": "^4.0",
"spatie/laravel-query-builder": "^3.4",
"spatie/laravel-settings": "^2.1",
"thiagoalessio/tesseract_ocr": "^2.12",
"tymon/jwt-auth": "dev-develop",
"williamcruzme/laravel-fcm": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"flipbox/lumen-generator": "^8.2",
"knuckleswtf/scribe": "^3.21",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"classmap": [
"database/migrations",
"tests/"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"composer/package-versions-deprecated": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}
主要问题是 tymon/jwt-auth 删除此软件包并全新安装解决了问题。
目前我正在为 API 使用 laravel 流明版本 8,我想集成 laravel/passport
以获得 API 的 OAuth 授权,但是当我尝试安装laravel/passport
我收到以下错误,无法为项目安装 laravel/passport
。我尝试为 laravel/passport
安装 dusterio/lumen
库,但该软件包在 lumen 8 方面也存在一些问题。
Problem 1
- lcobucci/jwt[3.3.0, ..., 3.4.x-dev] require php ^5.6 || ^7.0 -> your php version (8.0.14) does not satisfy that requirement.
- lcobucci/jwt 4.0.0-alpha1 requires php ^7.1 -> your php version (8.0.14) does not satisfy that requirement.
- lcobucci/jwt[4.0.0-alpha2, ..., 4.0.0-alpha3] require php ^7.2 -> your php version (8.0.14) does not satisfy that requirement.
- Conclusion: don't install laravel/passport v10.3.2 (conflict analysis result)
- Root composer.json requires tymon/jwt-auth dev-develop -> satisfiable by tymon/jwt-auth[dev-develop].
- Root composer.json requires laravel/passport ^10.3 -> satisfiable by laravel/passport[v10.3.0, v10.3.1, v10.3.2, 10.x-dev].
- tymon/jwt-auth dev-develop requires lcobucci/jwt <3.4 -> satisfiable by lcobucci/jwt[1.0.0, 1.0.1, 1.0.2, 1.1.0, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.3.x-dev].
- You can only install one version of a package, so only one of these can be installed: lcobucci/jwt[1.0.0, 1.0.1, 1.0.2, 1.1.0, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.4.x-dev, 4.0.0-alpha1, ..., 4.2.x-dev].
- laravel/passport 10.x-dev requires lcobucci/jwt ^3.4|^4.0 -> satisfiable by lcobucci/jwt[3.4.0, ..., 3.4.x-dev, 4.0.0-alpha1, ..., 4.2.x-dev].
- Conclusion: don't install lcobucci/jwt 4.1.5 (conflict analysis result)
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/passport:*" to figure out if any version is installable, or "composer require laravel/passport:^2.1" if you know which you need.
以下是我项目的composer.json。
{
"require": {
"php": "^7.3|^8.0",
"dingo/api": "^3.0.0",
"doctrine/dbal": "^3.1",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0",
"illuminate/notifications": "^8.49",
"illuminate/redis": "^8.49",
"intervention/image": "^2.6",
"laravel-notification-channels/onesignal": "^2.3",
"laravel/lumen-framework": "^8.0",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "^3.1",
"pusher/pusher-php-server": "^7.0",
"simplesoftwareio/simple-qrcode": "^4.2",
"spatie/data-transfer-object": "^3.7",
"spatie/laravel-activitylog": "^4.4",
"spatie/laravel-permission": "^4.0",
"spatie/laravel-query-builder": "^3.4",
"spatie/laravel-settings": "^2.1",
"thiagoalessio/tesseract_ocr": "^2.12",
"tymon/jwt-auth": "dev-develop",
"williamcruzme/laravel-fcm": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"flipbox/lumen-generator": "^8.2",
"knuckleswtf/scribe": "^3.21",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"classmap": [
"database/migrations",
"tests/"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"composer/package-versions-deprecated": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}
主要问题是 tymon/jwt-auth 删除此软件包并全新安装解决了问题。