Regex在更新后更新symfony渲染标签签名



symfony更新后,渲染标签签名发生了变化(https://github.com/symfony/symfony/blob/master/UPGRADE-2.2.md):

:

{% render 'BlogBundle:Post:list' with { 'limit': 2 }, { 'alt': 'BlogBundle:Post:error' } %}
:后

{% render controller('BlogBundle:Post:list', { 'limit': 2 }), { 'alt': 'BlogBundle:Post:error' } %}
{# Or: #}
{{ render(controller('BlogBundle:Post:list', { 'limit': 2 }), { 'alt': 'BlogBundle:Post:error'}) }}

我正在寻找一种方法来修改我的调用自动使用一些正则表达式。有人能帮忙吗?

replace:

{% render ([^,%]*?), ([^%]*?)%}

:

{% render controller(1), 2%}

最新更新