added a note in the docs about the PSR-11 runtime loader

This commit is contained in:
Fabien Potencier
2017-02-17 11:16:50 -08:00
parent c9ce259c9f
commit 7efe539b82
+5
View File
@@ -830,6 +830,11 @@ instance on the environment that knows how to instantiate such runtime classes
$twig->addRuntimeLoader(new RuntimeLoader());
.. note::
As of Twig 1.32, Twig comes with a PSR-11 compatible runtime loader
(``Twig_ContainerRuntimeLoader``) that works on PHP 5.3+.
It is now possible to move the runtime logic to a new
``Project_Twig_RuntimeExtension`` class and use it directly in the extension::