Skip to content

Commit d9f8bbd

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Logger] Using LogLevel `const`s [Messenger] Mention `ScheduledStamp`
2 parents f218d81 + 62a2a10 commit d9f8bbd

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

components/messenger.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@ Here are some important envelope stamps that are shipped with the Symfony Messen
162162
to configure the validation groups used when the validation middleware is enabled.
163163
* :class:`Symfony\\Component\\Messenger\\Stamp\\ErrorDetailsStamp`,
164164
an internal stamp when a message fails due to an exception in the handler.
165+
* :class:`Symfony\\Component\\Messenger\\Stamp\\ScheduledStamp`,
166+
a stamp that marks the message as produced by a scheduler. This helps
167+
differentiate it from messages created "manually". You can learn more about it
168+
in the :doc:`Scheduler documentation </scheduler>`.
169+
170+
.. versionadded:: 6.4
171+
172+
The :class:`Symfony\\Component\\Messenger\\Stamp\\ScheduledStamp` was
173+
introduced in Symfony 6.4.
165174

166175
.. note::
167176

logging.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ to write logs using the :phpfunction:`syslog` function:
155155
.. code-block:: php
156156
157157
// config/packages/prod/monolog.php
158+
use Psr\Log\LogLevel;
158159
use Symfony\Config\MonologConfig;
159160
160161
return static function (MonologConfig $monolog): void {
@@ -164,12 +165,12 @@ to write logs using the :phpfunction:`syslog` function:
164165
// log to var/logs/(environment).log
165166
->path('%kernel.logs_dir%/%kernel.environment%.log')
166167
// log *all* messages (debug is lowest level)
167-
->level('debug');
168+
->level(LogLevel::DEBUG);
168169
169170
$monolog->handler('syslog_handler')
170171
->type('syslog')
171172
// log error-level messages and higher
172-
->level('error');
173+
->level(LogLevel::ERROR);
173174
};
174175
175176
This defines a *stack* of handlers and each handler is called in the order that it's

scheduler.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,15 @@ before being further redispatched to its corresponding handler::
881881
}
882882
}
883883

884+
When using the ``RedispatchMessage``, Symfony will attach a
885+
:class:`Symfony\\Component\\Messenger\\Stamp\\ScheduledStamp` to the message,
886+
helping you identify those messages when needed.
887+
888+
.. versionadded:: 6.4
889+
890+
Automatically attaching a :class:`Symfony\\Component\\Messenger\\Stamp\\ScheduledStamp`
891+
to redispatched messages was introduced in Symfony 6.4.
892+
884893
.. _`Memoizing`: https://en.wikipedia.org/wiki/Memoization
885894
.. _`cron command-line utility`: https://en.wikipedia.org/wiki/Cron
886895
.. _`crontab.guru website`: https://crontab.guru/

0 commit comments

Comments
 (0)