Skip to content

Commit 1d75746

Browse files
committed
minor symfony#59322 [Runtime] removing the warning on incorrect PHP_SAPI value (dsdeboer)
This PR was merged into the 7.2 branch. Discussion ---------- [Runtime] removing the warning on incorrect `PHP_SAPI` value As per the comments in the issue I'm proposing a change to remove the check on this specific point as it also in my opinion is not necessary. | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix symfony#58729 | License | MIT As per the discussion in the referenced issue, hereby a proposal to remove the warning which occurs when running the symfony application using `symfony/runtime` against a PHP_SAPI other than in the allowed list. Commits ------- d7703b8 Removing the warning on incorrect PHP_SAPI value
2 parents c9ad225 + d7703b8 commit 1d75746

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Symfony/Component/Runtime/SymfonyRuntime.php

Lines changed: 0 additions & 4 deletions
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)