Skip to content

fix(locale): force locale.default on *_unlocalized serve routes - #15

Merged
HecFranco merged 1 commit into
mainfrom
feat/unlocalized-default-locale-subscriber
Oct 1, 2026
Merged

HecFranco merged 1 commit into
mainfrom
feat/unlocalized-default-locale-subscriber

Conversation

@HecFranco

Copy link
Copy Markdown
Contributor

Summary

  • Add UnlocalizedDefaultLocaleSubscriber (priority 14) so locale.unlocalized: serve re-applies locale.default on AuthKit *_unlocalized routes after Symfony LocaleListener.
  • Covers Docker/image route-cache warmed with a different _locale than runtime DEFAULT_LOCALE (bare /login, etc.).
  • Docs/spec inventory + unit tests; no-op when unlocalized: redirect or non-AuthKit routes.

Test plan

  • vendor/bin/phpunit tests/Unit/EventSubscriber/UnlocalizedDefaultLocaleSubscriberTest.php
  • Full PHPUnit suite (pre-commit)
  • Smoke: locale.in_path: both + unlocalized: serve, warm routes with default: en, run with default: es, hit /login → html[lang=es]

Re-apply AuthKit locale.default after LocaleListener so bare /login (etc.)
stays correct when the warmed route cache baked a different _locale
(image build vs runtime DEFAULT_LOCALE).
@HecFranco
HecFranco merged commit 62fe92a into main Oct 1, 2026
11 of 13 checks passed
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