spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.66k stars 763 forks source link

Artisan::call() throws a SIGINT undefined error #1309

Closed jacob-hyde closed 3 years ago

jacob-hyde commented 3 years ago

Using the Artisan facade to make a call to a command with this package installed throws an error: Undefined constant \"Spatie\Backup\Commands\SIGINT\"

Is there any known workarounds for this?

Related issue: https://github.com/spatie/laravel-backup/issues/1288

@SuddenlyRust comment:

I have encountered the same problem on my forge machine (linux). It happens when I use the Artisan-Facade to call any command.

Reproduction:

  1. Add a route to your web.php-file:
use App\Console\Commands\MyCommand;
use Illuminate\Support\Facades\Artisan;

Route::get('/reproduction', function () {
    Artisan::call(MyCommand::class);

    return '👀';
});
  1. Visit /reproduction with your browser.

  2. Following exception is thrown: Undefined constant "Spatie\Backup\Commands\SIGINT"


OS: Ubuntu 20.04.2 LTS PHP: v8.0.3 Webserver: nginx/1.18.0 Laravel: v8.37.0 spatie/laravel-backup: v7.5.1

Originally posted by @SuddenlyRust in https://github.com/spatie/laravel-backup/issues/1288#issuecomment-821182809

alexrififi commented 3 years ago

Same error on Ubuntu

karticbedi commented 3 years ago

I'm also having same problem on laravel forge, Ubuntu 20, laravel 8, PHP 8, latest package.

JuanDMeGon commented 3 years ago

Can confirm. It happens when calling any command using the Artisan facade (for some reason).

I am getting this on a Homestead virtual machine as well.