Normalize entry params - #2004
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Email/Service/EmailLogService.php:181
- The linked issue and “main patch” are about adding search/filtering to the sent-mails list, but this change only alters the email-parameter response. It neither implements nor supports the
/emails/searchflow in UI PR #3946, so it cannot resolve the cited issue as described. Please correct the PR description/linkage if this normalization is the intended scope, or include the backend search support that the description claims.
$this->normalizeParamValue($value)
jcPimcore
left a comment
There was a problem hiding this comment.
Good fix — EmailLogEntryParameter's constructor requires ?string under strict_types=1, but Mail::setParam() accepts mixed, so any logged email with a bool/int/array template param would TypeError on GET /emails/{id}/params. normalizeParamValue() fixes this at the right spot (the service producing the value, not the schema contract), and correctly leaves the resend path (setEmailDocumentContent) untouched since that needs the original typed value.
One ask before merging: this repo has a solid per-service unit-test convention (tests/Unit/<Module>/Service/*ServiceTest.php), but there's no tests/Unit/Email suite at all. Since this fixes an actual crash, could you add a small test for getEntryParams()/normalizeParamValue covering bool/int/array values?
Check the new commit @jcPimcore |
|
Confirmed — |
|
Hi @alexej-d |
|
I have adjusted my code in both bundles @jcPimcore |



Changes in this pull request
Resolves #321
Additional info
Needed in addition to the main patch.