I wanted to update from Laravel 5.5 to 10. My php version is 8.1.5 but facing many problems to update directly here. Especially ,
requires php ^7.3 -> your php version (8.1.5) does not satisfy that requirement.
if it can't be updated directly, what steps should be taken? I have attached my Composer json file below.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"barryvdh/laravel-dompdf": "^0.8.4",
"fideloper/proxy": "~3.3",
"gloudemans/shoppingcart": "^2.5",
"intervention/image": "^2.4",
"laravel/framework": "10",
"laravel/tinker": "~1.0",
"niklasravnsborg/laravel-pdf": "^3.1",
"shipu/php-aamarpay-payment": "^1.0",
"milon/barcode": "^5.2",
"yajra/laravel-datatables": "1.5"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"extra": {
"laravel": {
"dont-discover": [
"laravel/dusk"
]
}
}
}
I wanted to take version 8 first, then 9 and 10 one by one, but mPDF caused the most problems.
Please help me I am beginner.
Laravel provides a full and understandable documentation on how to update Laravel. You could upgrade directly from Laravel 5.5.0 to Laravel 10.x, but it could create a lot of errors that will be difficult to understand and to solve. I suggest you follow this process and upgrade your project to each version before by following the versionning order, you start by 5.5.0 to 5.6, then 5.6 to 5.7, 5.7 to 5.8, 5.8 to 6.x, 6.x to 7.x, 7.x to 8.x, 8.x to 9.x and 9.x to 10.x
Here is the documentation from where you should start. Just to be clear I am not saying you cannot upgrad directly from Laravel 5.5.0 to Laravel 10. I've already did it with Laravel 5.7 to Laravel 9.x. I don't remember exactly every step, but I remember that I did this
After that there were a lot of errors from Laravel framework components, I solved them all one by one, it took me an afternoon. I would have avoid all this error solving if I would have followed every upgrade documentation and followed the versionning in order.
If you are curious here is my project in Laravel 9.x and you can see the fork attached to it is in Laravel 5.7 and it works perfectly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With