skip to Main Content

I’m running a laravel-5.8-application and I want to install the spatie/laravel-query-builder, but for some reason, when I run

composer require spatie/laravel-query-builder

I get some errors:

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

Problem 1
– Conclusion: remove laravel/framework v5.8.0
– Conclusion: don’t install laravel/framework v5.8.0
– spatie/laravel-query-builder 3.2.0 requires illuminate/database ^6.0|^7.0|^8.0 -> satisfiable by illuminate/database…

And I have no clue why, since I do have requirements due to the documentation page https://spatie.be/docs/laravel-query-builder/v3/requirements – I have PHP 7.3 and Laravel 5.8

Can someone help me out?

2

Answers


  1. This package seems to be looking fo Laravel v6 or greater. If you look at Packagist – https://packagist.org/packages/laravel/framework#v5.8.0, You can see that 5.8.0 of Laravel installs illuminate/database v5.8.0

    Seems like you may need to contact Spatie or raise a bug ticket

    Login or Signup to reply.
  2. The documentation must be outdated, because the latest composer.json released to this date (v3.2.4, here: https://github.com/spatie/laravel-query-builder/blob/3.2.4/composer.json) requires at least php 7.3 and Laravel 6

    "require": {
            "php": "^7.3",
            "illuminate/database": "^6.0|^7.0|^8.0",
            "illuminate/http": "^6.0|^7.0|^8.0",
            "illuminate/support": "^6.0|^7.0|^8.0"
        },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search