@rushikesh93 You can use this command file which helps you to easy switch from one version to another version within second. So when you have to work on this old laravel version project just switch. https://github.com/vinugawade/s-php/blob/master/s-php
it is possible to upgrade only php version php 7.4 to php 8.1 without upgrade Laravel version?
Updated Question
I want to upgrade only the PHP version for my Laravel project,
My Laravel Framework version is 6.20.19 and PHP version is 7.4,
now I want to upgrade only php version php 7.4 to PHP 8.1 for my current Laravel project, how can I do without upgrading the Laravel version?
I have configured PHP 8.1 in my Linux System and configured my Laravel 6.20 version project, and made some changes in composer.json.
"require": { "php": "^8.1", "laravel/framework": "^6.0", "barryvdh/laravel-dompdf": "^0.8.5", "fideloper/proxy": "^4.4", "laravel/helpers": "^1.3", "laravel/socialite": "^5.2", "laravel/tinker": "^2.5", "razorpay/razorpay": "^2.5", "twilio/sdk": "^6.16", "vanilla/js-connect-php": "^4.0", "facade/flare-client-php": "^1.5", "symfony/http-foundation": "^5.4", "symfony/mime": "^6.2|^7.0", "symfony/mailer": "^v6.3.0", "swiftmailer/swiftmailer": "^6.0" }, "require-dev": { "facade/ignition": "^1.4", "fzaninotto/faker": "^v1.9.2", "laravel/ui": "^1.0", "mockery/mockery": "^1.4", "nunomaduro/collision": "^3.0", "phpunit/phpunit": "^9.5" },
now run "composer update --with-all-dependencies" Output
Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1 - Root composer.json requires facade/flare-client-php ^1.5 -> satisfiable by facade/flare-client-php[1.5.0, ..., 1.10.0]. - facade/flare-client-php[1.5.0, ..., 1.10.0] require symfony/mime ^3.4|^4.0|^5.1 -> found symfony/mime[v4.3.0-BETA1, ..., 4.4.x-dev, v5.1.0-BETA1, ..., 5.4.x-dev] but it conflicts with your root composer.json require (^6.2|^7.0). Problem 2 - laravel/framework[v6.20.0, ..., 6.x-dev] require symfony/http-foundation ^4.3.4 -> found symfony/http-foundation[v4.3.4, ..., 4.4.x-dev] but it conflicts with your root composer.json require (^5.4). - laravel/framework[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.21) does not satisfy that requirement. - Root composer.json requires laravel/framework ^6.0 -> satisfiable by laravel/framework[v6.0.0, ..., 6.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Please or to participate in this conversation.