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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -