for upgrade ,just run
composer update
just before run this, upgrade composer with command
composer selfupdate
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Yes, I am following Laravel Upgrade Docs https://laravel.com/docs/10.x/upgrade
This will be my first time trying to update a Laravel build. so please be kind - lol.
Laravel now requires PHP 8.1.0 or greater.
I assume I would do each step and run composer update ?..
Like update PHP to ^8.1 on the .env and then run composer update ?
Then update 1 dependency and again run composer update ?
</end question>
for upgrade ,just run
composer update
just before run this, upgrade composer with command
composer selfupdate
No need to change anything in env. You make sure that you have php 8.1 or 8.2 installed. Then you edit the composer.json file to say laravel/framework ^10.0 instead of 9. Then you run composer update and see if it gives any errors. If it does, post those here along with the composer.json :)
@aifx4intel The PHP version is the version of PHP you need to installed on the server you intend to run your Laravel application. So your needs PHP 8.1 or greater to be able to run a Laravel 10 project.
The easiest is to follow the official guide
@Tray2 Thank you - as you can see it was my 1st point of reference above. (only follow Laravel official)
Yeah, I am running latest version of PHP & Composer..
Thank you for your responses.
I will update everything needed in versions on .env and then run 'composer update'
@aifx4intel Not sure why you keep mentioning .env. That file has nothing to do with the upgrade. Do you perhaps mean composer.json ?
@Sinnbeck oops.. i meant composer.json
Here goes :
php -v
PHP 8.1.12 (cli) (built: Oct 25 2022 18:16:21) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
updated to PHP 8.1.0
composer -v
Composer version 2.5.1 2022-12-22 15:33:54
A per Laravel.com
You should update the following dependencies in your application's composer.json file:
laravel/framework to ^10.0 - # completedlaravel/sanctum to ^3.2 - # completedspatie/laravel-ignition to ^2.0 # added this - it was not present - # completedYou should update the minimum-stability setting in your application's composer.json file to stable:
"minimum-stability": "stable", # completed
PS C:\laragon\www\aifx-web> composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires realrashid/sweet-alert ^4.1 -> satisfiable by realrashid/sweet-alert[v4.1.0].
- realrashid/sweet-alert v4.1.0 requires laravel/framework ^5.6|^6.0|^7.0|^8.0 -> found laravel/framework[v5.6.0, ..., v5.8.38, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but it conflicts with your root composer.json require (^10.0).
Problem 2
- mpociot/teamwork[6.1.0, ..., 6.1.1] require php ^7.2.5 -> your php version (8.1.12) does not satisfy that requirement.
- mpociot/teamwork 6.1.2 requires laravel/framework ^6.0|^7.0|^8.0 -> found laravel/framework[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but it conflicts with your root composer.json require (^10.0).
- Root composer.json requires mpociot/teamwork ^6.1 -> satisfiable by mpociot/teamwork[6.1.0, 6.1.1, 6.1.2].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
PS C:\laragon\www\aifx-web>
COMPOSER.JSON
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.1",
"botman/botman": "^2.6",
"box/spout": "^3.3",
"doctrine/dbal": "^3.3",
"friendsofphp/php-cs-fixer": "^3.6",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.4",
"laravel/breeze": "^1.4",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.4",
"laravelcollective/html": "^6.2",
"laraveldaily/larastarters": "^1.3",
"livewire/livewire": "^2.10",
"mediconesystems/livewire-datatables": "^0.6.8",
"mpociot/teamwork": "^6.1",
"power-components/livewire-powergrid": "^2.2",
"realrashid/sweet-alert": "^4.1",
"spatie/laravel-cookie-consent": "^3.2",
"spatie/laravel-permission": "^5.5",
"wire-elements/modal": "^1.0",
"spatie/laravel-ignition": "^2.0"
},
"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.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"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",
"@php artisan vendor:publish --force --tag=livewire:assets --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"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": "stable",
"prefer-stable": true
}
@aifx4intel Ok. Then you look up that package that fails to see which version supports laravel 10 :)
In this case you need version 6. You have 4.1. Be aware that you might need to change some stuff in how you use that package to get it working
Bugger.. I am having a grey day -- my current laravel verion is "laravel/framework": "^8.75",
Does this mean I must first go from 8 ==> 9?
@aifx4intel Ah yes. That might be a good idea. Or at least read throught the upgrade guide from 8 to 9
It would seem easier at this point ( mostly front facing with only backend subscribe and contact request database display ) -- to just move the website over to a new install and then rebuild the admin dash and contact database thing.
OMG !! I have soooo much built into this project.. Auto Bot Chat and a few other sweets.. How does one maintain a laravel build!
@aifx4intel I personally upgrade after each new version. Sure it sometimes requires a bit of replacing of packages and such, but if its just 1 major version it often isnt that bad. Maybe just focus on laravel 9 for now, and then come back for laravel 10 in a month or two. Packages are still being upgraded for laravel 10
@Sinnbeck great advice.. I will work on moving from 8 to 9.. Thank you everyone for your time.
@aifx4intel I still haven't upgraded to laravel 10 either. Ill probably wait a month myself
@aifx4intel Have you considered using Laravel Shift?
@Tray2 agree. saving much time and also before using Laravel Shift, make use https://caniupgradelaravel.com/ to check your installed package. :)
@Tray2 Yeah - read everything about it.. I just cant afford it yet...
@aifx4intel I do it manually every time. It isnt that hard :) But having tests helps a ton
@Sinnbeck LOL -- I still need to learn that aspect of development - you will probably see a thread in the future from me asking about Laravel Testing.
Thank you everyone for your participation here.
Please or to participate in this conversation.