Category: twig

Cannot autowire service argument "$locales" of method "__construct()" is type-hinted "string", you should configure its value explicitly in symfony

I want to use new md2html Twig filter to easily transform Markdown but faced this error: " Cannot autowire service "AppTwigAppExtension": argument "$locales" of method "__construct()" is type-hinted "string", you should configure its value explicitly. " How to solve this…

twig: take only the first 3 elements of a foreach loop [duplicate]

I have this code in twig: {% for row in api_data.response %} <div class="singlePostContainer"> <span class="postNumber"> 01 </span> <div class="postTextContainer"> <div class="postTitle"> {{row.album}} </div> <div class="postDate"> {{row.anno}} </div> <div class="postAuthor"> author </div> </div> </div> {% endfor %} api_data.response contains 11…