Skip to content

Commit f79ae88

Browse files
tjampsGuikingone
authored andcommitted
Add missing RuntimeExtensionInterface
If the Twig runtime class does not implement RuntimeExtensionInterface, the autoconfigure feature of the container will not tag it with `twig.runtime`, and an exception will be thrown ("Unable to load the "App\Twig\AppRuntime" runtime.")
1 parent 6c3c575 commit f79ae88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templating/twig_extension.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ previous ``priceFilter()`` method::
117117
// src/Twig/AppRuntime.php
118118
namespace App\Twig;
119119

120-
class AppRuntime
120+
use use Twig\Extension\RuntimeExtensionInterface;
121+
122+
class AppRuntime implements RuntimeExtensionInterface
121123
{
122124
public function __construct()
123125
{

0 commit comments

Comments
 (0)