New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TwigBridge][TwigBundle] Add current locale to AppVariable
#49913
Conversation
AppVariable
AppVariable
About the failing tests, I may need some help / directions here.
|
For low-deps, you need to increase the lower bound of the requirement |
Thank you for the input, CI is still failling but not because of this PR. |
Thank you @SVillette. |
This PR was merged into the 6.3 branch. Discussion ---------- Add Twig `app.locale` documentation The PR add documentation of symfony/symfony#49913 Commits ------- ac51842 docs: add `app.locale` from Twig `AppVariable`
When installing the Twig Bundle 6.3.0-BETA1 this breaks the application if you didn't directly add the bridge as well: !! [Symfony\Component\ErrorHandler\Error\UndefinedMethodError]
!! Attempted to call an undefined method named "setLocaleSwitcher" of class "S
!! ymfony\Bridge\Twig\AppVariable". Bundle 6.3 is thus incompatible with Bridge 6.2 yet this is not enforced through dependencies. |
…version (SVillette) This PR was merged into the 6.3 branch. Discussion ---------- [TwigBundle] fixed wrong `symfony/twig-bridge` dependency version | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #50245 | License | MIT | Doc PR | - `TwigBundle` had wrong dependency version after #49913. This PR fixes this issue. Commits ------- c05f484 fix(twig-bundle): fixed wrong `symfony/twig-bridge` dependency
As stated in #49870, they were no way to get the current locale without passing it through a variable when rendering a template within
LocaleSwitcher::runWithLocale()
.A doc PR will be submitted if this change is accepted.