Skip to content

Improve the documentation of php_errors in the reference #20710

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Changes from all 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
10 changes: 7 additions & 3 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3062,11 +3062,15 @@ php_errors
log
...

**type**: ``boolean|int`` **default**: ``%kernel.debug%``
**type**: ``boolean|int|array<int, string>`` **default**: ``%kernel.debug%``

Use the application logger instead of the PHP logger for logging PHP errors.
When an integer value is used, it also sets the log level. Those integer
values must be the same used in the `error_reporting PHP option`_.
When an integer value is used, it defines a bitmask of PHP errors that will
be logged. Those integer values must be the same used in the
`error_reporting PHP option`_. The default log levels will be used for each
PHP error.
When a boolean value is used, ``true`` enables logging for all PHP errors
while ``false`` disables logging entirely.

This option also accepts a map of PHP errors to log levels:

Expand Down