Skip to content

LOG-10069: Symfony 7.4 / psr/log v3 compatibility fixes#22

Open
justenj wants to merge 1 commit into
auto1-oss:masterfrom
justenj:LOG-10069-symfony-7-compat
Open

LOG-10069: Symfony 7.4 / psr/log v3 compatibility fixes#22
justenj wants to merge 1 commit into
auto1-oss:masterfrom
justenj:LOG-10069-symfony-7-compat

Conversation

@justenj

@justenj justenj commented Jun 23, 2026

Copy link
Copy Markdown

Summary

Compatibility fixes required for Symfony 7.4 and psr/log v3.

  • LoggerAwareTrait::setLogger(): void — psr/log v3 LoggerAwareInterface::setLogger(): void requires a void return. The previous implementation returned $this, which is a fatal compile error under strict interface checking.
  • JsonEncoder::supportsEncoding(string $format): bool and supportsDecoding(string $format): bool — Symfony 7 JsonEncoder parent class declares string type on $format; child class must match.
  • UrlEncode, UrlEncoder, VoidEncoderencode(mixed $data, string $format, ...) and supportsEncoding(string $format, array $context = []): bool — Symfony 7 EncoderInterface declares 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). The EndpointsDebugCommand::execute(): int and ArrayAccessNormalizer fixes 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

- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant