regex to update symfony render tag signature after update -
after symfony update render tag signature has changed (https://github.com/symfony/symfony/blob/master/upgrade-2.2.md):
before:
{% render 'blogbundle:post:list' { 'limit': 2 }, { 'alt': 'blogbundle:post:error' } %}
after:
{% render controller('blogbundle:post:list', { 'limit': 2 }), { 'alt': 'blogbundle:post:error' } %} {# or: #} {{ render(controller('blogbundle:post:list', { 'limit': 2 }), { 'alt': 'blogbundle:post:error'}) }}
i'm looking way modify calls automatically using regular expression. can help?
replace:
\{% render ([^,%]*?), ([^%]*?)%\}
with:
{% render controller(\1), \2%}
Comments
Post a Comment