0

I am trying to integrate Paystack payment platform to my project. But each time I run the command composer require wisdomanthoni/cashier-paystack, it returns the following error.

./composer.json has been updated
Running composer update wisdomanthoni/cashier-paystack
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires wisdomanthoni/cashier-paystack ^1.0 -> satisfiable by wisdomanthoni/cashier-paystack[v1.0.0].
    - wisdomanthoni/cashier-paystack v1.0.0 requires illuminate/database ~5.7.0|~5.8.0 -> found illuminate/database[v5.7.0, ..., 5.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.
  • `wisdomanthoni/cashier-paystack` is a rather old package, you should search for something that is still maintained – Nico Haase Feb 25 '21 at 10:31

3 Answers3

1

Illuminate/Database is currently at version 8.29.0. This means you're installing some Laravel 5.x dependency (likely on Laravel 8.x), which might be incompatible - if not already abandoned. If you cannot find a current version, you'd likely have to fix what you have - or use it with Laravel 5.x.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
0

I manually resolved the dependencies by importing the libraries into the project manually and also running a composer update command

  • 1
    Please share more details - what do you mean by "importing the libraries manually"? – Nico Haase May 05 '21 at 12:34
  • Copied the composer required files into the vendor folder and using the "composer update" command to resolve the dependencies to match the current laravel version – Fiyinfoluwa Osuntola May 05 '21 at 12:35
  • 1
    Please add all clarification to your answer by editing it - also, you know that anything you've copied into the vendor folder by hand is gone after running the next round of `composer install`? – Nico Haase May 05 '21 at 13:07
0

I encountered a similar issue when trying to install this spatie package:composer require spatie/laravel-disable-floc and got this error message: Your requirements could not be resolved to an installable set of packages.

Problem 1 - Root composer.json requires spatie/laravel-disable-floc ^1.0 -> satisfiable by spatie/laravel-disable-floc[1.0.0]. - spatie/laravel-disable-floc 1.0.0 requires illuminate/contracts ^7.30|^8.37 -> found illuminate/contracts[v7.30.0, ..., 7.x-dev, v8.37.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.

Curious to know what you did. Or for suggestions from others.

Adefowowe
  • 198
  • 2
  • 14
  • I resolved this using pointers from this post: https://stackoverflow.com/questions/65446578/problem-with-installing-laravel-ui-in-laravel-8. I manually updated my laravel version in my composer.json file, ran composer update, after which I then ran the command to install the package. And it worked. – Adefowowe May 06 '21 at 09:22