-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Extract the escaping logic to a runtime #4055
Conversation
b03c16f
to
60c1417
Compare
aa30dca
to
3e742f9
Compare
For once, i'd suggest to add some "magic" because the DX seem a bit odd (to me).. Could we expose directly something like ? $env->getEscaper() With maybe a dedicated interface ? |
I don't think we need a "nicer" DX as using this directly should be the exception, not the rule. |
* @param string $strategy The strategy name that should be used as a strategy in the escape call | ||
* @param callable $callable A valid PHP callable | ||
* @param string $strategy The strategy name that should be used as a strategy in the escape call | ||
* @param callable(Environment, string) $callable A valid PHP callable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callable also receives the charset as a third argument.
This PR was merged into the 5.4 branch. Discussion ---------- [WebProfilerBundle] fix compatibility with Twig 3.10 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see twigphp/Twig#4055 Commits ------- a4190b5 fix compatibility with Twig 3.10
This PR was merged into the 2.x branch. Discussion ---------- [Stimulus] Use Twig >3.9 'EscaperRuntime' | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix #... | License | MIT Resolves CI deprecations (for > Twig 3.9) Twig introduction of EscaperRuntime here: twigphp/Twig#4055 Commits ------- 1fe2ae3 [Stimulus] Use Twig >3.9 'EscaperRuntime'
No description provided.