简体   繁体   中英

Laravel 5.8 and PHP version 7.3 - Cannot install spatie laravel-query-builder

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?

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

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"
    },

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM