я пытался использовать
# app/config/services.yml
services:
project.controller.some:
class: Project\SomeBundle\Controller\SomeController
arguments: ['@templating']
а также
namespace Project\SomeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Symfony\Component\HttpFoundation\Response;
class SomeController
{
private $templating;
public function __construct(EngineInterface $templating)
{
$this->templating = $templating;
}
public function indexAction()
{
return $this->templating->render(
'SomeBundle::template.html.twig',
array(
)
);
}
}
в Symfony 4 flex. Теперь я получаю ошибку
ServiceNotFoundException
The service "project.controller.some" has a dependency on a non-existent service "templating".
Пожалуйста, скажите мне, как это решить. Мой composer.json уже содержит "symfony/templating": "^4.0", но этого недостаточно.