The*_*Boy 3 datatables laravel composer-php serverside-datatable
我正在尝试使用以下命令安装 yajra/laravel-datatables-oracle:
composer require yajra/laravel-datatables-oracle
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- yajra/laravel-datatables[dev-master, v9.0.0] require yajra/laravel-datatables-oracle 10.* -> satisfiable by yajra/laravel-datatables-oracle[v10.0.0, ..., 10.x-dev (alias of dev-master)].
- yajra/laravel-datatables-oracle 10.x-dev is an alias of yajra/laravel-datatables-oracle dev-master and thus requires it to be installed too.
- yajra/laravel-datatables-oracle[dev-master, v10.0.0, ..., v10.1.2] require illuminate/database ^9 -> found illuminate/database[v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
- yajra/laravel-datatables 9.0.x-dev is an alias of yajra/laravel-datatables dev-master and thus requires it to be installed too.
- Root composer.json requires yajra/laravel-datatables ^9.0 -> satisfiable by yajra/laravel-datatables[v9.0.0, 9.0.x-dev (alias of dev-master)].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Run Code Online (Sandbox Code Playgroud)
我的laravel框架版本是v8.83.22。
下面是我的composer.json 文件,显示了我的所有依赖项和要求
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"barryvdh/laravel-dompdf": "^1.0.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"intervention/image": "^2.6",
"jimmyjs/laravel-report-generator": "^2.1",
"laravel/framework": "^8.54",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.3",
"laraveldaily/laravel-invoices": "3.0",
"pragmarx/tracker": "^4.0",
"rap2hpoutre/fast-excel": "^4.0",
"simplesoftwareio/simple-qrcode": "^4.2"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6",
"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"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Run Code Online (Sandbox Code Playgroud)
请注意,这些要求只是最低要求,例如我安装的 php 版本是 8.0.8,laravel 框架是 v8.83.22
mat*_*iti 11
正如一位用户提到的,您需要使用以前的版本 (9),因为最新版本 (10) 仅支持Laravel 9.x+,而您正在使用Laravel 8.x.
composer require yajra/laravel-datatables-oracle:^9.0
Run Code Online (Sandbox Code Playgroud)
我还看到你提到:
尝试并得到以下错误: [InvalidArgumentException] 版本 9.0 的 yajra/laravel-datatables-oracle 包具有与您的 PHP 版本、PHP 扩展和 Composer 版本不兼容的 PHP 要求: - yajra/laravel-datatables-oracle v9.0.0 需要php ^7.1.3 与您安装的版本 8.0.8 不匹配。
这意味着您正在使用PHP 8.0但yajra/laravel-datatables-oracle:^9.0仅支持7.1 <= PHP > 8.0,因此请使用这个:
composer require yajra/laravel-datatables-oracle:^9.21.2
Run Code Online (Sandbox Code Playgroud)
那个版本composer.json是这样的:
"require": {
"php": "^7.1.3|^8",
"illuminate/database": "5.8.*|^6|^7|^8|^9",
"illuminate/filesystem": "5.8.*|^6|^7|^8|^9",
"illuminate/http": "5.8.*|^6|^7|^8|^9",
"illuminate/support": "5.8.*|^6|^7|^8|^9",
"illuminate/view": "5.8.*|^6|^7|^8|^9"
},
Run Code Online (Sandbox Code Playgroud)
这意味着它将允许您使用任何 Laravel >= 5.8.x,但也允许您使用PHP >= 7.1.
Yajra 版本9.0composer.json之前不支持这一点,这就是它失败的原因:
"require": {
"php": "^7.1.3",
"illuminate/database": "5.8.*",
"illuminate/filesystem": "5.8.*",
"illuminate/http": "5.8.*",
"illuminate/support": "5.8.*",
"illuminate/view": "5.8.*"
},
Run Code Online (Sandbox Code Playgroud)
你可以看到它只支持 Laravel 5.8 并且7.1 <= PHP > 8.0
| 归档时间: |
|
| 查看次数: |
7781 次 |
| 最近记录: |