-2

I install a package composer require staudenmeir/laravel-adjacency-list:"^1.0" but i got an the following errors.

Problem 1
- staudenmeir/laravel-adjacency-list[v1.0, ..., 1.0.x-dev] require illuminate/database ~5.5.29|5.6.*|5.7.* -> found illuminate/database[v5.5.33..., 5.7.x-dev] but it conflicts with another require.
- staudenmeir/laravel-adjacency-list[v1.1, ..., 1.1.x-dev] require php ^7.1.3 -> your php version (8.0.3) does not satisfy that requirement.
- staudenmeir/laravel-adjacency-list[v1.2, ..., 1.3.x-dev] require php ^7.2 -> your php version (8.0.3) does not satisfy that requirement.
- staudenmeir/laravel-adjacency-list[v1.4, ..., v1.5] require php ^7.2.5 -> your php version (8.0.3) does not satisfy that requirement.
- staudenmeir/laravel-adjacency-list v1.6 requires php ^7.3 -> your php version (8.0.3) does not satisfy that requirement.
- staudenmeir/laravel-adjacency-list v1.6.1 requires illuminate/database ^8.0 -> found illuminate/database[v8.0.0, ..., 8.x-dev] but it conflicts with another require.
- Root composer.json requires staudenmeir/laravel-adjacency-list ^1.0 -> satisfiable by staudenmeir/laravel-adjacency-list[v1.0, ..., v1.6.1].

My composerr.json is below

  "require": {
    "php": "^7.3|^8.0",
     .
     .
    "laravel/framework": "^6.18.35",

     }

I tried it before in my project having version 8.12 of laravel i.e. Laravel v8.12 it worked smoothly but the problem arises when i switched to project having laravel v6.18.35. I dont know what is wrong? Is this package depends on laravel version ?But why they mention it in Packagist website as it supports Laravel 5.5.29+.??
Please help me please. i am stucking

SAID KHAMIS
  • 67
  • 2
  • 11
  • 1
    Does this answer your question? [Reference - Composer error "Your PHP version does not satisfy requirements" after upgrading PHP](https://stackoverflow.com/questions/66368196/reference-composer-error-your-php-version-does-not-satisfy-requirements-afte) – Nico Haase May 17 '21 at 11:04
  • no it does not. – SAID KHAMIS May 17 '21 at 11:07
  • What does that mean? Please share your attempts to resolve the problem – Nico Haase May 17 '21 at 11:10
  • I do not know what went wrong cause i tried to do everything include upgrading php version but the same error appears. I looks at Packagist website to see if there is any change of package version but there was nothing.. I used it before in my laravel project having version 8..3 it worked correctly but why in this version of laravel 6.199? – SAID KHAMIS May 17 '21 at 11:24
  • Please add all clarification to your question by updating it. What makes you think that the given package should support both Laravel v6 **and** PHP v8, which it does not according to packagist.org? – Nico Haase May 17 '21 at 11:41
  • Ok, I have already edit – SAID KHAMIS May 17 '21 at 12:19
  • "But why they mention it in Packagist website as it supports Laravel 5.5.29+.?? " - what does that mean? Also, once more: that package has different versions that are either compatible with Laravel v6 **or** with PHP v8. I could not find any version that supports both – Nico Haase May 17 '21 at 12:40
  • I think a new version works only in laravel v8 – SAID KHAMIS May 17 '21 at 13:04
  • 1
    I don't think you will be able to use this package in this project with PHP 8. Recent version of `staudenmeir/laravel-adjacency-list` works on PHP 8, but does not support Laravel 6. Old version that supports Laravel 6, does not supports PHP 8. So you should either upgrade Laravel or downgrade PHP if you want to install `staudenmeir/laravel-adjacency-list`. – rob006 May 17 '21 at 13:21

1 Answers1

-2

I solved it..

A new version of staudenmeir/laravel-adjacency-list works on PHP 8 and not support laravel 6 so what i did was to upgrade my project laravel version to v8 then it workes smoothly.

Thanks for your responses

SAID KHAMIS
  • 67
  • 2
  • 11