Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jacob-hyde opened this issue May 7, 2021 · 3 comments
Closed

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

jacob-hyde opened this issue May 7, 2021 · 3 comments

Comments

@jacob-hyde
Copy link

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: #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 #1288 (comment)

@alexrififi
Copy link

Same error on Ubuntu

@karticbedi
Copy link

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

@JuanDMeGon
Copy link

JuanDMeGon commented May 17, 2021

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.

mafeijam added a commit to mafeijam/laravel-backup that referenced this issue May 18, 2021
this is to solve issue spatie#1309 when executing command from the web instead of CLI
freekmurze pushed a commit that referenced this issue May 28, 2021
* Update BaseCommand.php

this is to solve issue #1309 when executing command from the web instead of CLI

* Update BaseCommand.php

* Update BaseCommand.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants