Skip to content

Commit

Permalink
Make the retrieval of template source compatible with Twig 2
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Mar 30, 2016
1 parent 851539a commit 6f2109d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CodeExplorerBundle/Twig/SourceCodeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public function getFunctions()
);
}

public function showSourceCode(\Twig_Environment $twig, \Twig_Template $template)
public function showSourceCode(\Twig_Environment $twig, $template)
{
return $twig->render('@CodeExplorer/source_code.html.twig', array(
'controller' => $this->getController(),
'template' => $this->getTemplateSource($template),
'template' => $this->getTemplateSource($twig->resolveTemplate($template)),
));
}

Expand Down

0 comments on commit 6f2109d

Please sign in to comment.