Skip to content

Commit aa1ee57

Browse files
authored
Fix PHP_CLI_SERVER_WORKERS inside laravel/sail (#56923)
PHP_CLI_SERVER_WORKERS environment variable did not work correctly in laravel sail due to phpServerWorkers being set to false instead of the set number
1 parent 3dc3269 commit aa1ee57

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Illuminate/Foundation/Console/ServeCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ protected function initialize(InputInterface $input, OutputInterface $output)
101101
return false;
102102
}
103103

104-
return $workers > 1 && ! $this->option('no-reload') ? false : $workers;
104+
if ($workers > 1 &&
105+
! $this->option('no-reload') &&
106+
! (int) env('LARAVEL_SAIL', 0)) {
107+
return false;
108+
}
109+
110+
return $workers;
105111
});
106112

107113
parent::initialize($input, $output);

0 commit comments

Comments
 (0)