Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] Add parameters kernel.runtime_mode and kernel.runtime_mode.*, all set from env var APP_RUNTIME_MODE#19067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletionsreference/configuration/kernel.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -308,6 +308,56 @@ the configuration options used to run the application. This allows for example
to run an application with the ``prod`` config (``kernel.environment``) in different
scenarios like ``staging`` or ``production`` (``kernel.runtime_environment``).

``kernel.runtime_mode``
-----------------------

**type**: ``string`` **default**: ``%env(query_string:default:container.runtime_mode:APP_RUNTIME_MODE)%``

This parameter stores a query string of the current runtime mode used by the
application. For example, the query string looks like ``web=1&worker=0`` when
the application is running in web mode and ``web=1&worker=1`` when running in
a long-running web server. This parameter can be set by using the
``APP_RUNTIME_MODE`` env var.

.. versionadded:: 6.4

The ``kernel.runtime_mode`` parameter was introduced in Symfony 6.4.

``kernel.runtime_mode.web``
---------------------------

**type**: ``boolean`` **default**: ``%env(bool:default::key:web:default:kernel.runtime_mode:)%``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
**type**: ``boolean`` **default**: ``%env(bool:default::key:web:default:kernel.runtime_mode:)%``
**type**: ``boolean`` **default**: ``%env(bool:default::key:web:default:kernel.runtime_mode??)%``

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is this correct?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

alamirault reacted with thumbs up emoji

Whether the application is running in a web environment.

.. versionadded:: 6.4

The ``kernel.runtime_mode.web`` parameter was introduced in Symfony 6.4.

``kernel.runtime_mode.cli``
---------------------------

**type**: ``boolean`` **default**: ``%env(not:default:kernel.runtime_mode.web:)%``

Whether the application is running in a CLI environment. By default,
this value is the opposite of the ``kernel.runtime_mode.web`` parameter.

.. versionadded:: 6.4

The ``kernel.runtime_mode.cli`` parameter was introduced in Symfony 6.4.

``kernel.runtime_mode.worker``
------------------------------

**type**: ``boolean`` **default**: ``%env(bool:default::key:worker:default:kernel.runtime_mode:)%``

Whether the application is running in a worker/long-running environment. Not all web
servers support it, and you have to use a long-running web server like `FrankenPHP`_.

.. versionadded:: 6.4

The ``kernel.runtime_mode.worker`` parameter was introduced in Symfony 6.4.

``kernel.secret``
-----------------

Expand DownExpand Up@@ -336,3 +386,4 @@ This parameter stores the value of

.. _`character encoding`: https://en.wikipedia.org/wiki/Character_encoding
.. _`reproducible builds`: https://en.wikipedia.org/wiki/Reproducible_builds
.. _`FrankenPHP`: https://frankenphp.dev

[8]ページ先頭

©2009-2025 Movatter.jp