3
votes

I keep getting errors when I type composer require spatie/laravel-backup

Nessrines-MacBook-Pro-2:tfw nessrine$ composer require spatie/laravel-backup
Using version ^4.16 for spatie/laravel-backup ./composer.json has been updated
> php artisan clear-compiled
The compiled services file has been removed.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1 - Installation request for spatie/laravel-backup ^4.16 -> satisfiable by spatie/laravel-backup[4.16.0]. - Conclusion: remove spatie/db-dumper 1.5.1 - Conclusion: don't install spatie/db-dumper 1.5.1 - spatie/laravel-backup 4.16.0 requires spatie/db-dumper ^2.6 -> satisfiable by spatie/db-dumper[2.6.0, 2.6.1, 2.7.0]. - Can only install one of: spatie/db-dumper[2.6.0, 1.5.1]. - Can only install one of: spatie/db-dumper[2.6.1, 1.5.1]. - Can only install one of: spatie/db-dumper[2.7.0, 1.5.1]. - Installation request for spatie/db-dumper (locked at 1.5.1) -> satisfiable by spatie/db-dumper[1.5.1].

Installation failed, reverting ./composer.json to its original content. Nessrines-MacBook-Pro-2:tfw nessrine$ composer require spatie/laravel-backup’

enter image description here
1
have you fulfilled all the requirements mentioned here.. ?docs.spatie.be/laravel-backup/v4/requirementsZedex7
how to check .?user8069069
You might have another package that requires db-dumper version 1.5.x which conflicts with this one. You should check the composer.json for each required package you have to make sure they're compatible with laravel-backup.apokryfos
ok i will try to find the required versionuser8069069
@apokryfos op shared the composer.json file. The package which op's trying to installed is already installed with an older version. All that's needed is to the updated the package or remove the older one and do a clean install of the newest version.Sandeesh

1 Answers

5
votes

You need to remove the outdated package spatie/db-dumper manually before installing spatie/laravel-backup which requires a newer version of the db dumper package.

You can remove spatie/db-dumper package from your composer.json file and then install. Or run composer remove spatie/db-dumper and then proceed to install the backup package.

Edit

From your comment it's clear that you already have an older version of the package spatie/laravel-backup installed.

Edit 2

Since you're obviously having trouble updating this package, here's the most simplest way that i can explain this.

Run composer remove spatie/laravel-backup

Go to config/app.php and remove the line Spatie\Backup\BackupServiceProvider::class

Run composer require spatie/laravel-backup

Follow further instructions for the package, which also includes adding the service provider back in app.php

https://docs.spatie.be/laravel-backup/v4/installation-and-setup