後symfony的更新後,呈現標籤簽名已經改變(https://github.com/symfony/symfony/blob/master/UPGRADE-2.2.md):正則表達式來更新symfony的渲染標籤簽名更新
前:
{% 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'}) }}
我尋找一種方法來使用一些正則表達式自動修改我的通話。 任何人都可以幫忙嗎?
什麼是輸入,什麼是所需的輸出?對不起,但你不清楚你的問題。 :) – zx81
真的值得嗎?必須修復代碼中的多少位置? –
'BlogBundle:Post:list','limit':2,'alt':'BlogBundle:Post:error'是可選的輸入。我有大約50個需要修復的條目。另外,在切換到新版本時,我希望儘可能減少停機時間。 –