mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
Add more information about migrating away from twig_escape_filter()
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
# 3.10.0 (2024-XX-XX)
|
||||
|
||||
* Extract the escaping logic to a runtime
|
||||
* Extract the escaping logic from the `EscapingExtension` class to a new `EscapingRuntime` class.
|
||||
|
||||
The following methods from ``Twig\\Extension\\EscaperExtension`` are
|
||||
deprecated: ``setEscaper()``, ``getEscapers()``, ``setDefaultStrategy()``,
|
||||
``getDefaultStrategy()``, ``setSafeClasses``, ``addSafeClasses()``. Use the
|
||||
same methods on the ``Twig\\Runtime\\EscaperRuntime`` class instead.
|
||||
|
||||
# 3.9.3 (2024-04-18)
|
||||
|
||||
|
||||
@@ -18,6 +18,20 @@ Extensions
|
||||
3.9.0, and will be removed in Twig 4.0. They have been replaced by internal
|
||||
methods on their respective extension classes.
|
||||
|
||||
If you were using the ``twig_escape_filter()`` function is your code, use
|
||||
``$env->getRuntime(EscaperRuntime::class)->escape()`` instead.
|
||||
|
||||
* The following methods from ``Twig\Extension\EscaperExtension`` are
|
||||
deprecated: ``setEscaper()``, ``getEscapers()``, ``setDefaultStrategy()``,
|
||||
``getDefaultStrategy()``, ``setSafeClasses``, ``addSafeClasses()``. Use the
|
||||
same methods on the ``Twig\Runtime\EscaperRuntime`` class instead.
|
||||
|
||||
Before:
|
||||
$twig->getExtension(EscaperExtension::class)->METHOD()
|
||||
|
||||
After:
|
||||
$twig->getRuntime(EscaperRuntime::class)->METHOD();
|
||||
|
||||
Node Visitors
|
||||
-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user