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

Laravel 11 artisan serve issue ( SIGINT ) #50027

Closed
parasshah438 opened this issue Feb 9, 2024 · 1 comment
Closed

Laravel 11 artisan serve issue ( SIGINT ) #50027

parasshah438 opened this issue Feb 9, 2024 · 1 comment

Comments

@parasshah438
Copy link

Laravel Version

11

PHP Version

8.3

Database Driver & Version

No response

Description

I Install laravel latest version 11

Start artisan serve then display error

Undefined constant "Illuminate\Foundation\Console\SIGINT"

vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php

$this->trap([SIGTERM, SIGINT, SIGHUP, SIGUSR1, SIGUSR2, SIGQUIT], function ($signal) use ($process) {
if ($process->isRunning()) {
$process->stop(10, $signal);
}
exit;
});

Steps To Reproduce

I also find solution for that
File path
vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php

I commit this trap code

$this->trap([SIGTERM, SIGINT, SIGHUP, SIGUSR1, SIGUSR2, SIGQUIT], function ($signal) use ($process) {
if ($process->isRunning()) {
$process->stop(10, $signal);
}
exit;
});

Now its working perfect

@crynobone
Copy link
Member

Duplicate of #50022

@crynobone crynobone marked this as a duplicate of #50022 Feb 9, 2024
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

2 participants