@@ -308,6 +308,56 @@ the configuration options used to run the application. This allows for example
308
308
to run an application with the ``prod `` config (``kernel.environment ``) in different
309
309
scenarios like ``staging `` or ``production `` (``kernel.runtime_environment ``).
310
310
311
+ ``kernel.runtime_mode ``
312
+ -----------------------
313
+
314
+ **type **: ``string `` **default **: ``%env(query_string:default:container.runtime_mode:APP_RUNTIME_MODE)% ``
315
+
316
+ This parameter stores a query string of the current runtime mode used by the
317
+ application. For example, the query string looks like ``web=1&worker=0 `` when
318
+ the application is running in web mode and ``web=1&worker=1 `` when running in
319
+ a long-running web server. This parameter can be set by using the
320
+ ``APP_RUNTIME_MODE `` env var.
321
+
322
+ .. versionadded :: 6.4
323
+
324
+ The ``kernel.runtime_mode `` parameter was introduced in Symfony 6.4.
325
+
326
+ ``kernel.runtime_mode.web ``
327
+ ---------------------------
328
+
329
+ **type **: ``boolean `` **default **: ``%env(bool:default::key:web:default:kernel.runtime_mode:)% ``
330
+
331
+ Whether the application is running in a web environment.
332
+
333
+ .. versionadded :: 6.4
334
+
335
+ The ``kernel.runtime_mode.web `` parameter was introduced in Symfony 6.4.
336
+
337
+ ``kernel.runtime_mode.cli ``
338
+ ---------------------------
339
+
340
+ **type **: ``boolean `` **default **: ``%env(not:default:kernel.runtime_mode.web:)% ``
341
+
342
+ Whether the application is running in a CLI environment. By default,
343
+ this value is the opposite of the ``kernel.runtime_mode.web `` parameter.
344
+
345
+ .. versionadded :: 6.4
346
+
347
+ The ``kernel.runtime_mode.cli `` parameter was introduced in Symfony 6.4.
348
+
349
+ ``kernel.runtime_mode.worker ``
350
+ ------------------------------
351
+
352
+ **type **: ``boolean `` **default **: ``%env(bool:default::key:worker:default:kernel.runtime_mode:)% ``
353
+
354
+ Whether the application is running in a worker/long-running environment. Not all web
355
+ servers support it, and you have to use a long-running web server like `FrankenPHP `_.
356
+
357
+ .. versionadded :: 6.4
358
+
359
+ The ``kernel.runtime_mode.worker `` parameter was introduced in Symfony 6.4.
360
+
311
361
``kernel.secret ``
312
362
-----------------
313
363
@@ -336,3 +386,4 @@ This parameter stores the value of
336
386
337
387
.. _`character encoding` : https://en.wikipedia.org/wiki/Character_encoding
338
388
.. _`reproducible builds` : https://en.wikipedia.org/wiki/Reproducible_builds
389
+ .. _`FrankenPHP` : https://frankenphp.dev
0 commit comments