Ensured plain string first arguments for logging#28
Merged
Conversation
rimi-itk
reviewed
Apr 9, 2026
rimi-itk
left a comment
Contributor
There was a problem hiding this comment.
Added comment on use of + with arrays.
| try { | ||
| $this->helper->archive($payload['submissionId'], $payload['handlerConfiguration']); | ||
| $this->submissionLogger->notice($this->t('The submission #@serial was successfully delivered', ['@serial' => $webformSubmission->serial()]), $logger_context); | ||
| $this->submissionLogger->notice('The submission #@serial was successfully delivered', $logger_context + ['@serial' => $webformSubmission->serial()]); |
Contributor
There was a problem hiding this comment.
This is not a real issue, but consider rewriting to
Suggested change
| $this->submissionLogger->notice('The submission #@serial was successfully delivered', $logger_context + ['@serial' => $webformSubmission->serial()]); | |
| $this->submissionLogger->notice('The submission #@serial was successfully delivered', ['@serial' => $webformSubmission->serial()] + $logger_context); |
to make sure that you actually set the @serial key in the context. If $logger_context for some weird and unlikely reason already has a value for @serial, your value will be ignored (cf. https://www.php.net/manual/en/language.operators.array.php). See https://onlinephp.io/c/862da for an example.
rimi-itk
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket
https://leantime.itkdev.dk/#/tickets/showTicket/7124
Description
Found by
Caution
The current set of package requirements cannot be installed from scratch. An issue discussing this has been created. We fully expect this to work in already installed installations, hence we ignore failed GitHub Actions right at this moment.