I try to upgrade my laravel 8 as I read here https://laravel.com/docs/9.x/upgrade
But after I applyid some changes in composer.json I got error :
$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- illuminate/support[v5.8.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement.
- illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.2) does not satisfy that requirement.
- illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.1.2) does not satisfy that requirement.
- illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.2) does not satisfy that requirement.
- Root composer.json requires artesaos/seotools ^0.20.2 -> satisfiable by artesaos/seotools[v0.20.2].
- Conclusion: don't install laravel/framework v9.0.0-beta.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.0-beta.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.0-beta.4 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.0-beta.5 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v9.0.0-beta.1 (conflict analysis result)
- artesaos/seotools v0.20.2 requires illuminate/support 5.8.* || ^6.0 || ^7.0 || ^8.0 -> satisfiable by illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev].
- Only one of these can be installed: illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v9.0.0-beta.1, ..., 9.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^v9.0 -> satisfiable by laravel/framework[v9.0.0-beta.1, ..., 9.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Now composer.json has :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.1",
"artesaos/seotools": "^0.20.2",
"barryvdh/laravel-dompdf": "^1.0.0",
"cviebrock/eloquent-sluggable": "^9.0.0",
"dompdf/dompdf": "1.0.0",
"fruitcake/laravel-cors": "^2.0.4",
"guzzlehttp/guzzle": "^7.4.0",
"intervention/image": "^2.7",
"jenssegers/agent": "^2.6",
"laravel/framework": "^v9.0",
"laravel/jetstream": "^2.4.4",
"laravel/sanctum": "^2.12.1",
"laravel/telescope": "^4.6.6",
"laravel/tinker": "^2.6.2",
"livewire/livewire": "^2.7.2",
"maatwebsite/excel": "^3.1.33",
"mews/purifier": "^3.3.6",
"spatie/laravel-medialibrary": "^9.0.0",
"spatie/laravel-permission": "^5.3.1",
"te7a-houdini/laravel-trix": "^2.0.5",
"wboyz/laravel-enum": "^0.2.1"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6.4",
"spatie/laravel-ignition": "^1.0",
"fakerphp/faker": "^1.16",
"laravel/sail": "^1.12.3",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"files": [
"app/Library/helper.php"
],
"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",
"@php artisan vendor:publish --force --tag=livewire:assets --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
}
and I do not see any illuminate* packages referenced in it...
How that can be fixed ?
Thanks!
CodePudding user response:
Laravel 9 requires PHP 8.
Delete the
^7.3|
in composer.json at the linePHP
The correct syntax is:"php": "^8.0"
Delete the
v
in composer.json at the linelaravel/framework
, The correct syntax is:"laravel/framework": "^9.0",
And check the package's
artesaos/seotools
compatibility with the Laravel 9