Skip to content

Dropbox backup type error - Illuminate Filesystem expected, League Flysystem given #1545

@janzikmund

Description

@janzikmund

laravel/framework: 9.19.0
spatie/laravel-backup: 8.1.2
spatie/flysystem-dropbox: 2.0.6

Hi, I recently upgraded to the versions above from Laravel 8, laravel-backup 6.14 and flysystem-dropbox 1.2.3. I have dropbox mapped as Laravel disk using Flysystem adapter as per Feek's blog here.

But after the upgrade, all calls like php artisan backup:run or php artisan backup:clean just give me the following error:

Spatie\Backup\BackupDestination\BackupDestination::__construct(): Argument #1 ($disk) must be of type ?Illuminate\Contracts\Filesystem\Filesystem, League\Flysystem\Filesystem given, called in /Users/ziki/Sites/mysite/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php on line 60

I tried removing /vendor dir and reinstalling composer dependencies, it was the same. I also tried downgrading backup and dropbox packages, but the older versions don't really work with Laravel 9.
I even tried changing the typehints to avoid the mismatch, but then I got a number of errors about methods not defined, so I am kind of stuck here and wondering if Dropbox can even be used this way anymore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions