0

Appreciate this is a common issue but I never understand what Composer is suggesting / wants from me when it throws these sorts of issues.

I have a Laravel app that I'm trying to install a new package into.

The following are the errors, how am I supposed to interpret what it's saying?

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

  Problem 1
    - laravel/framework v8.9.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    - laravel/framework v8.8.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    - laravel/framework v8.7.1 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    - laravel/framework v8.7.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    - laravel/framework v8.6.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    - laravel/framework v8.5.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
    ... more of the same errors
    - Conclusion: don't install laravel/framework v8.83.17
    - Conclusion: don't install laravel/framework v8.83.16
    - Conclusion: don't install laravel/framework v8.83.15
    - Conclusion: don't install laravel/framework v8.83.14
    - Conclusion: don't install laravel/framework v8.83.13
    - Conclusion: don't install laravel/framework v8.83.12
    ... more of the same
    - Installation request for laravel/framework (locked at v8.21.0, required as ^8.0) -> satisfiable by laravel/framework[v8.21.0].
    - Installation request for spatie/laravel-health ^1.9 -> satisfiable by spatie/laravel-health[1.9.0, 1.9.1, 1.9.2].
    - Can only install one of: laravel/framework[9.x-dev, 8.x-dev].
    - Can only install one of: laravel/framework[v8.12.0, 9.x-dev].
    - Can only install one of: laravel/framework[v8.12.1, 9.x-dev].
    ... more of the same
    - Conclusion: install laravel/framework 9.x-dev
    - Installation request for laravel/framework ^8.0 -> satisfiable by laravel/framework[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.10.0, v8.11.0, v8.11.1, v8.11.2, v8.12.0, v8.12.1, v8.12.2, v8.12.3, v8.13.0, v8.14.0, v8.15.0, v8.16.0, v8.16.1, v8.17.0, v8.17.1, v8.17.2, v8.18.0, v8.18.1, v8.19.0, v8.2.0, v8.20.0, v8.20.1, v8.21.0, v8.22.0, v8.22.1, v8.23.0, v8.23.1, v8.24.0, v8.25.0, v8.26.0, v8.26.1, v8.27.0, v8.28.0, v8.28.1, v8.29.0, v8.3.0, v8.30.0, v8.30.1, v8.31.0, v8.32.0, v8.32.1, v8.33.0, v8.33.1, v8.34.0, v8.35.0, v8.35.1, v8.36.0, v8.36.1, v8.36.2, v8.37.0, v8.38.0, v8.39.0, v8.4.0, v8.40.0, v8.41.0, v8.42.0, v8.42.1, v8.43.0, v8.44.0, v8.45.0, v8.45.1, v8.46.0, v8.47.0, v8.48.0, v8.48.1, v8.48.2, v8.49.0, v8.49.1, v8.49.2, v8.5.0, v8.50.0, v8.51.0, v8.52.0, v8.53.0, v8.53.1, v8.54.0, v8.55.0, v8.56.0, v8.57.0, v8.58.0, v8.59.0, v8.6.0, v8.60.0, v8.61.0, v8.62.0, v8.63.0, v8.64.0, v8.65.0, v8.66.0, v8.67.0, v8.68.0, v8.68.1, v8.69.0, v8.7.0, v8.7.1, v8.70.0, v8.70.1, v8.70.2, v8.71.0, v8.72.0, v8.73.0, v8.73.1, v8.73.2, v8.74.0, v8.75.0, v8.76.0, v8.76.1, v8.76.2, v8.77.0, v8.77.1, v8.78.0, v8.78.1, v8.79.0, v8.8.0, v8.80.0, v8.81.0, v8.82.0, v8.83.0, v8.83.1, v8.83.10, v8.83.11, v8.83.12, v8.83.13, v8.83.14, v8.83.15, v8.83.16, v8.83.17, v8.83.2, v8.83.3, v8.83.4, v8.83.5, v8.83.6, v8.83.7, v8.83.8, v8.83.9, v8.9.0].
  • `Can only install one of: laravel/framework[9.x-dev, 8.x-dev].` and `Conclusion: install laravel/framework 9.x-dev` says it all. – Martin Jun 24 '22 at 09:40

1 Answers1

1

You have to upgrade your laravel version to correspond with your PHP 8.0.15 (switch to Laravel version 9) or downgrade your php version to works with Laravel 8.* so use PHP 7.4.30 but it's not recommanded beacuse PHP 7.4 ends support in 28 Nov 2022.

That's it !

vinceAmstoutz
  • 676
  • 1
  • 4
  • 18
  • Thanks, upgrading to L9 causes a whole new host of Composer issues. The joys of an older project thats not been maintained. – Craig Lovelock Jun 24 '22 at 11:04
  • 1
    Keey courage! By building up the dependencies a little at a time and using the `--with-all-dependencies` option (when you do a `composer update --with-all-dependencies` for example) you'll get there ! – vinceAmstoutz Jun 24 '22 at 11:36