Laravel-backup: Regression in #663 - Call to undefined method Illuminate\Http\File::delete()

Created on 24 Apr 2018  路  5Comments  路  Source: spatie/laravel-backup

Hi, I think #663 introduced a regression.
When I run php artisan backup:run, I get:

````
php artisan backup:run
Starting backup...
Dumping database xxxxxxxxxx...
Gzipping xxxxxxxxxxx...

Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Illuminate\Http\File::delete()

at /xxxxxxxx/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php:240
236| if (config('backup.backup.gzip_database_dump')) {
237| consoleOutput()->info("Gzipping {$dbDumper->getDbName()}...");
238|
239| $compressedDumpPath = Gzip::compress($temporaryFilePath);

240| File::delete($temporaryFilePath);
241|
242| return $compressedDumpPath;
243| }
244|

Exception trace:

1 SpatieBackup\TasksBackupBackupJob::SpatieBackup\TasksBackup{closure}(Object(Spatie\DbDumper\Databases\MySql), "mysql")
[internal]:0

2 array_map(Object(Closure), [Object(Spatie\DbDumper\Databases\MySql)])
/xxxxxxxxxxxxxxxxx/vendor/laravel/framework/src/Illuminate/Support/Collection.php:911

````

Most helpful comment

We definitely need to get this merged. Our backups are currently broken while running the latest version of this package.

All 5 comments

We definitely need to get this merged. Our backups are currently broken while running the latest version of this package.

Trying to backup my database to s3 and am currently stuck because of this error.

spatie-error

Till this pull request is merged, I think its better to downgrade to "spatie/laravel-backup": "5.6.1", no longer getting this error.

Fix is merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mvdnbrk picture mvdnbrk  路  3Comments

ClickerVinod picture ClickerVinod  路  3Comments

scottconnerly picture scottconnerly  路  4Comments

KHucks picture KHucks  路  3Comments

stefro picture stefro  路  7Comments