In Laravel10 Not a major upgrade as like 9. But Laravel 10 still has many changes like
- Laravel Pennant: feature flags with ease
- Handle external processes with ease
- Identify slow-running tests
- Laravel v10 uses invokable validation rules by default
- The Laravel 10 skeleton uses native types instead of docblocks
- Customize the path of config files
- doctrine/dbal is not needed anymore to modify columns in migrations
Note- Laravel 10 requires at least Composer 2.2
I will give you two condition should you upgrade or not.
Upgrade
- Is now a days project in development phase
- Your project required the package which is in laravel10.
Not required for Upgrade
- Your project have all done, not required any code as of date
Now coming to how we will upgrade
Minimum requirements-
- PHP 8.1+ with the following extensions:
- Ctype
- cURL
- DOM
- Fileinfo
- Filter
- Hash
- Mbstring
- OpenSSL
- PCRE
- PDO
- Session
- Tokenizer
- XML
- Nginx or Apache
See the official link for upgrade
Change the line in composer.json
"laravel/framework": "^9.XX", to "laravel/framework": "^10.0", "spatie/laravel-ignition": "^x.x" to "spatie/laravel-ignition": "^2.0" "nunomaduro/collision": "^6.1", to "nunomaduro/collision": "^7.0", "phpunit/phpunit": "^9.5.10", to "phpunit/phpunit": "^10.0", "minimum-stability": "dev", to "minimum-stability": "stable",
if all done run the below command,
sudo composer update
result
Hope all good, Happy coding
Read Also
What’s New in Laravel 10
Laravel Force Redirect HTTP to HTTPS