1

I recently downloaded the latest xampp and shifted all my project to it. After that I cannot able to install any new packages. I am getting errors


Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ^7.2.5 but your php version (8.0.2) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires laravel/ui 2.4 -> satisfiable by laravel/ui[v2.4.0].
    - laravel/ui v2.4.0 requires php ^7.2.5 -> your php version (8.0.2) does not satisfy that requirement.

I tried different solution like updating composer.json file. by seeing this https://stackoverflow.com/questions/65454412/root-composer-json-requires-php-7-3-but-your-php-version-8-0-0-does-not-satis

"require": {
    "php": "^7.2.5 || ^8.0",
    .....
},

but not working. I need help in solving this issue.

I have tried deleting composer.lock file and then deleted vendor folder and run composer install command. Getting the below error

Problem 1
    - Conclusion: don't install laravel/framework v7.29.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.29.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.29.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.29.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.30.0 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.30.1 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.30.2 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.30.3 (conflict analysis result)
    - Conclusion: don't install laravel/framework v7.30.4 (conflict analysis result)
    - illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.0.2) does not satisfy that requirement.
    - laravel/framework[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.0.2) does not satisfy that requirement.
    - laravel/ui[v3.1.0, ..., 3.x-dev] require illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev].
    - Only one of these can be installed: illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v7.0.0, ..., 7.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^7.0 -> satisfiable by laravel/framework[v7.0.0, ..., 7.x-dev].
    - Root composer.json requires laravel/ui ^3.1.0 -> satisfiable by laravel/ui[v3.1.0, v3.2.0, 3.x-dev].

Thank you

Shadow
  • 33,525
  • 10
  • 51
  • 64
matheen ulla
  • 526
  • 7
  • 27

1 Answers1

3

laravel/ui 2.4.0 is not supporting PHP 8. You should use version 3.1.0 or above.

You should add a supporting version in your composer.json:

"require": {
    "php": "^7.2.5 || ^8.0",
    "laravel/ui": "^3.1.0"
    .....
},

And then reinstall dependencies:

composer install
PunyFlash
  • 1,030
  • 1
  • 6
  • 12
  • I tried running composer install but same error – matheen ulla Feb 21 '21 at 12:21
  • Try to remove `composer.lock` and `vendor` dir – PunyFlash Feb 21 '21 at 12:25
  • Now I have deleted ```composer.lock file``` and then deleted vendor folder and run composer install command. I have updated the error in my questions – matheen ulla Feb 21 '21 at 12:29
  • 2
    So I checked some more info about `laravel/ui` package. Starting from v3.0 it uses `illuminate/support` v8 - this basicaly requires you to update your app to Laravel 8.The issue will be solved if you remove `laravel/ui` or upgrade your laravel version: https://laravel.com/docs/8.x/upgrade. Or alternatively downgrade your PHP version to 7.2.5 – PunyFlash Feb 21 '21 at 12:41
  • I tried removing laravel UI. After removing I am unable to use Auth::routes – matheen ulla Feb 21 '21 at 12:46
  • 1
    Sure, this function is provided by `laravel/ui`. You may register routes by yourself, check original example from `laravel/ui` https://github.com/laravel/ui/blob/2ee66eed86ba56e024b204d2a4741204ffb24e3b/src/AuthRouteMethods.php – PunyFlash Feb 21 '21 at 12:50
  • Hey thanks for the info. I have updated my project to laravel 8. Still It's working fine. I don't know how the auth routes are working. If you have any idea about that it will be helpful for me – matheen ulla Feb 21 '21 at 13:01
  • still getting same error after upgrading to laravel 8 ```phpoffice/phpspreadsheet[1.15.0, ..., 1.16.0] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.``` – matheen ulla Feb 21 '21 at 13:21