I looked around for the code to get the current path in a Twig template (and not the full URL), i.e. I don\'t want http://www.sitename.com/page, I only need
http://www.sitename.com/page
Get current url: {{ app.request.uri }} in Symfony 2.3, 3, 4, 5
{{ app.request.uri }}
Get path only: {{ app.request.pathinfo }} (without parameters)
{{ app.request.pathinfo }}
Get request uri: {{ app.request.requesturi }} (with parameters)
{{ app.request.requesturi }}