laravel-zero / laravel-zero

A PHP framework for console artisans

Home Page:https://laravel-zero.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined constant "SIGINT"

dineshuprety opened this issue · comments

I get this error in the console while running app:build

Undefined constant "SIGINT"

at vendor\laravel-zero\framework\src\Commands\BuildCommand.php:75
   71▕
   72▕     /** @return array<int, int> */
   73▕     public function getSubscribedSignals(): array
   74▕     {
➜  75▕         return [\SIGINT];
   76▕     }
   77▕
   78▕     /** {@inheritdoc} */
   79▕     public function handleSignal(int $signal): int|false

1   vendor\symfony\console\Application.php:1003
    LaravelZero\Framework\Commands\BuildCommand::getSubscribedSignals()

2   vendor\symfony\console\Application.php:320
    Symfony\Component\Console\Application::doRunCommand(Object(LaravelZero\Framework\Comman
ds\BuildCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component
\Console\Output\ConsoleOutput))

commented

I just came across this too. You need to have PHP's pcntl extension installed for this to work. (Note that this extension is not available on Windows.)

I think this can be fixed pretty easily the same way spatie/laravel-backup#1311 does it, I'm going to see if I can submit a PR for it.