[docs] CoreExtension::setEscaper is deprecated

This commit is contained in:
SpacePossum
2020-03-30 12:14:13 +02:00
committed by GitHub
parent 6df2e2c318
commit 628fde13ba
+1 -1
View File
@@ -100,7 +100,7 @@ used in the ``escape`` call) and the second one must be a valid PHP callable:
.. code-block:: php
$twig = new \Twig\Environment($loader);
$twig->getExtension(\Twig\Extension\CoreExtension::class)->setEscaper('csv', 'csv_escaper');
$twig->getExtension(\Twig\Extension\EscaperExtension::class)->setEscaper('csv', 'csv_escaper');
When called by Twig, the callable receives the Twig environment instance, the
string to escape, and the charset.