Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install on PHP 8 #53

Closed
raphaelbeckmann opened this issue Mar 29, 2021 · 2 comments
Closed

Can't install on PHP 8 #53

raphaelbeckmann opened this issue Mar 29, 2021 · 2 comments

Comments

@raphaelbeckmann
Copy link

raphaelbeckmann commented Mar 29, 2021

It's not possible to use this on Laravel 6 and PHP 8.
Laravel requires illuminate/database @ "self.version" which means they're using 6.x on Laravel 6.x:
https://github.com/laravel/framework/blob/006ba38124df6a8a651546a0301d604665b394b7/composer.json#L56

However this package requires illuminate/database version 8.

Steps to reproduce:

$ composer create-project laravel/laravel:"^6.20" example-app
$ cd example-app
$ composer require staudenmeir/belongs-to-through:"^2.11.1"

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires staudenmeir/belongs-to-through ^2.11.1 -> satisfiable by staudenmeir/belongs-to-through[v2.11.1].
    - staudenmeir/belongs-to-through v2.11.1 requires illuminate/database ^8.0 -> found illuminate/database[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Solution:

This package should require "illuminate/database": "^6.0|^7.0|^8.0".

@staudenmeir
Copy link
Owner

The package does support that: composer require staudenmeir/belongs-to-through:"^2.9"

@raphaelbeckmann
Copy link
Author

Thank you, that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants