LOG-10069: Symfony 7.4 / psr/log v3 compatibility fixes#22
Open
justenj wants to merge 1 commit into
Open
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.
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.
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