Skip to content

Commit 8e8d09b

Browse files
committed
Removing the warning on incorrect PHP_SAPI value
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.
1 parent 2c35056 commit 8e8d09b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

SymfonyRuntime.php

-4
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ public function getRunner(?object $application): RunnerInterface
160160
}
161161

162162
if ($application instanceof Application) {
163-
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
164-
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
165-
}
166-
167163
set_time_limit(0);
168164
$defaultEnv = !isset($this->options['env']) ? ($_SERVER[$this->options['env_var_name']] ?? 'dev') : null;
169165
$output = $this->output ??= new ConsoleOutput();

0 commit comments

Comments
 (0)