Repository navigation
Conversation
- LoggerAwareTrait::setLogger() returns void (psr/log v3 LoggerAwareInterface) - JsonEncoder::supportsEncoding/supportsDecoding: add string type to $format - UrlEncode::encode: add mixed/string types; supportsEncoding: add string+context - UrlEncoder::encode: add mixed/string types; supportsEncoding: add string+context - VoidEncoder::encode: add mixed/string types; supportsEncoding: add string+context Required for Symfony 7.4 which enforces EncoderInterface and LoggerAwareInterface type declarations strictly.
ReviewBlocking: CI is already red on PHP 7.4The 7.4 job fails (all 8.x pass). The cause is structural:
Two consistent ways to resolve; the PR currently sits between them:
Given the goal is just unblocking the Symfony 7.4 upgrade downstream, option 1 is the lower-risk choice unless dropping PHP 7.4/Symfony 4 is a deliberate decision. Other notes
VerdictRequest changes. The |
aivus
left a comment
There was a problem hiding this comment.
Requesting changes — see detailed review in #22 (comment)
TL;DR: the setLogger(): void fix is correct and required for psr/log v3, but the encoder parameter-type additions (mixed $data, string $format) break the package's own declared support matrix — PHP 7.4 CI is already failing, and Symfony ~4.x (still allowed in composer.json) would fatal on narrowed parameter types. Either revert the parameter-type additions (they aren't required for Symfony 7 — parameter widening is legal), or explicitly drop PHP 7.4 / Symfony 4 support in composer.json and the CI matrix within this PR.
Summary
Compatibility fixes required for Symfony 7.4 and psr/log v3.
LoggerAwareTrait::setLogger(): void— psr/log v3LoggerAwareInterface::setLogger(): voidrequires a void return. The previous implementation returned$this, which is a fatal compile error under strict interface checking.JsonEncoder::supportsEncoding(string $format): boolandsupportsDecoding(string $format): bool— Symfony 7JsonEncoderparent class declaresstringtype on$format; child class must match.UrlEncode,UrlEncoder,VoidEncoder—encode(mixed $data, string $format, ...)andsupportsEncoding(string $format, array $context = []): bool— Symfony 7EncoderInterfacedeclares typed parameters; subclass declarations must be compatible.Context
These fixes are needed as part of a Symfony 5.4→7.4 upgrade of
wkda/eta-management-service(LOG-10069). TheEndpointsDebugCommand::execute(): intandArrayAccessNormalizerfixes were already merged in PR #19. This PR covers the remaining compatibility gaps.Related to open PR #20 (PUR1-3530) which also fixes
LoggerAwareTrait::setLogger(): void.🤖 Generated with Claude Code