Skip to content

Conversation

@stof
Copy link
Owner

@stof stof commented May 1, 2025

Registering it in the LocaleSwitcher of Symfony has multiple benefits:

  • it allows respecting the locale when it is switched in non-request context (or after the listener that was running for request contexts), for instance in commands or in queue consumers
  • it avoids leaking the locale of a request to the beginning of the processing of the next one when using Frankenphp in worker mode (or as the LocaleSwitcher of Symfony resets the locale to the default locale of the project when necessary.

Registering it in the LocaleSwitcher of Symfony has multiple benefits:
- it allows respecting the locale when it is switched in non-request
  context (or after the listener that was running for request contexts),
  for instance in commands or in queue consumers
- it avoids leaking the locale of a request to the beginning of the
  processing of the next one when using Frankenphp in worker mode (or
  as the LocaleSwitcher of Symfony resets the locale to the default
  locale of the project when necessary.
@stof stof merged commit bdf3eb1 into main May 1, 2025
16 checks passed
@stof stof deleted the locale_sync branch May 1, 2025 08:00
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.

2 participants