topclaudy / compoships

Multi-columns relationships for Laravel's Eloquent ORM
MIT License
1.12k stars 130 forks source link

Version conflict when test with Laravel 10 #152

Closed kitloong closed 1 year ago

kitloong commented 1 year ago

I am getting the following error when trying to test my Laravel 10 support with awobaz/compoships as a dependency.

awobaz/compoships dev-master requires illuminate/database >=5.6 <=10.0 -> found illuminate/database[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev] but it conflicts with your root composer.json require (10.x-dev).

In your composer.json the version is defined as below:

"require": {
    "illuminate/database": ">=5.6 <=10.0"
},

I am not sure but it seems <=10.0 does not match 10.x-dev, v10.0.1, and above?

erikn69 commented 1 year ago

Duplicate of #145 Already handled by #146, read other Issues, PRs, Discussions before opening a new one

I am not sure but it seems <=10.0 does not match 10.x-dev, v10.0.1, and above?

It does, just have to change your composer.json

"minimum-stability": "dev",
"prefer-stable": false,
parallels999 commented 1 year ago

@topclaudy please make a release for packagist

topclaudy commented 1 year ago

@parallels999 2.2.0 released!

parallels999 commented 1 year ago

@topclaudy thank you very much

kitloong commented 1 year ago

Actually, this issue is not a duplicate of #145 from what I have described with the error message.

"minimum-stability": "dev",
"prefer-stable": false,

This is assumed that the composer couldn't find the dev-master however the composer documentation has explained this is not the case. (And the error message provided also stated the same thing.)

If you require a dev version or only alphas are available for a package, those will still be selected granted that the minimum-stability allows for it.

This issue is about the version constraint defined by the package doesn't match version 10. So even after the 2.2.0 was released, the Laravel 10 project still can't install compoship.

Steps to reproduce:

  1. git clone https://github.com/laravel/laravel.git
  2. cd laravel && git checkout master
  3. composer require awobaz/compoships

Produce

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

  Problem 1
    ...
    - awobaz/compoships[dev-master, 2.2.0] require illuminate/database >=5.6 <=10.0 -> found illuminate/database[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires awobaz/compoships * -> satisfiable by awobaz/compoships[dev-master, 1.0.0, ..., 1.1.18, 2.0.0, ..., 2.2.0, 9999999-dev].
   ...
parallels999 commented 1 year ago

the version constraint defined by the package doesn't match version 10.

https://github.com/topclaudy/compoships/actions/runs/4065240923/jobs/6999678812 It is not a bug, laravel 10 is not released yet

kitloong commented 1 year ago

Okay... Just leaving this for reference (taking v9 as an example, will only match v9.0.0) https://semver.madewithlove.com/?package=illuminate%2Fdatabase&constraint=%3E%3D5.6+%3C%3D9.0&stability=dev

erikn69 commented 1 year ago

@kitloong thanks, review #153