Just a little heads-up for people working with Symfony2/Twig: Today I ran into an issue that I couldn't figure out. "It shouldn't be this hard..." I thought, and indeed, it turned out not to be as hard. It's just easy to overlook: Make sure to close your twig tags correctly
The error was a relatively simple error:

I couldn't figure out why it was complaining about the endblock tag. It was there and it looked correct. After much trial and error, I spotted the mistake. It was a stupid and very simple mistake: instead of {% endtrans %}, I actually had a second {% trans %}-tag in my template. Stupid! So, if you run into the exception Unknown tag name "endblock" in {}, start scanning your template for tags that haven't been properly closed. That should help you solve your problem