for a really specific project I have to use PHP files as template in Symfony, so I render them on my controller, but when I go on the right path in my browser, the PHP isn't interpreted then display code like html.
I've know that on older version Symfony it was easy to enable PHP template, but now I didn't find how with Symfony 6.
Does someone know how to do that ?
Example :
My index.php path : /templates/gfservphp/index.php
#[Route('/index', name: 'app_index_gf')]
public function indexgf(): Response
{
return $this->render('gfservphp/index.php', [
'controller_name' => 'MainController',
]);
}