Boa Tarde Marcelo.
Primeiramente obrigado pela ajuda.
Agora, me apareceu outro erro, mas desta vez foi com o extends. Eu tenho dois arquivos na pasta web, tentei colocar tudo num local só.
web/layout.html web/index.php
no index, eu tenho o seguinte código.
{% extends "layout.php" %}
{% block content %}
<h1>Welcome to Silex!<h1>
{% endblock %}
Já no layout tenho o código padrão que vem no Twig, e tenho o block content.
Quando renderizo o template, tenho o seguinte erro:
Twig_Error_Runtime: An
exception has been thrown during the rendering of a template ("Accessed
request service outside of request scope. Try moving that call to a
before handler or controller.") in "index.php".
RuntimeException: Accessed request service outside of request scope. Try moving that call to a before handler or controller.
Observeção: O template renderiza corretamente quando eu não utilizo o extends layout.
O que poderia ser?