Skip to content

Commit 86901b1

Browse files
[HttpKernel] Add parameters kernel.runtime_mode and kernel.runtime_mode.*, all set from env var APP_RUNTIME_MODE
1 parent 87e0d10 commit 86901b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Resources/functions/dump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function dump(mixed ...$vars): mixed
4545
if (!function_exists('dd')) {
4646
function dd(mixed ...$vars): never
4747
{
48-
if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) {
48+
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) && !headers_sent()) {
4949
header('HTTP/1.1 500 Internal Server Error');
5050
}
5151

VarDumper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ private static function register(): void
8585
case 'server' === $format:
8686
case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME):
8787
$host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format;
88-
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
88+
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? new CliDumper() : new HtmlDumper();
8989
$dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders());
9090
break;
9191
default:
92-
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
92+
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? new CliDumper() : new HtmlDumper();
9393
}
9494

9595
if (!$dumper instanceof ServerDumper) {
@@ -111,7 +111,7 @@ private static function getDefaultContextProviders(): array
111111
{
112112
$contextProviders = [];
113113

114-
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && class_exists(Request::class)) {
114+
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) && class_exists(Request::class)) {
115115
$requestStack = new RequestStack();
116116
$requestStack->push(Request::createFromGlobals());
117117
$contextProviders['request'] = new RequestContextProvider($requestStack);

0 commit comments

Comments
 (0)