Skip to content

Commit

Permalink
Removing the warning on incorrect PHP_SAPI value
Browse files Browse the repository at this point in the history
As per the comments in the issue symfony/symfony#58729 I'm proposing a change to remove the check on this specific point as it also in my opinion is not necessary.
  • Loading branch information
dsdeboer committed Dec 29, 2024
1 parent 2c35056 commit 8e8d09b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions SymfonyRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ public function getRunner(?object $application): RunnerInterface
}

if ($application instanceof Application) {
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
}

set_time_limit(0);
$defaultEnv = !isset($this->options['env']) ? ($_SERVER[$this->options['env_var_name']] ?? 'dev') : null;
$output = $this->output ??= new ConsoleOutput();
Expand Down

0 comments on commit 8e8d09b

Please sign in to comment.