2015-06-30 123 views

回答

0

好像我錯過了爲其他data_collector服務添加必要的額外參數。這裏看起來對於我當時不需要的其他服務看起來如何:

services: 

    data_collector.translation: 
     class: 'Symfony\Component\Translation\DataCollector\TranslationDataCollector' 
     tags: 
      - {name: 'data_collector', priority: '0'} 
     arguments: [@translator.data_collector] 

    data_collector.form: 
     class: "%data_collector.form.class%" 
     tags: 
      - {name: 'data_collector', priority: '0'} 
     arguments: [@data_collector.form.extractor] 

    data_collector.logger: 
     class: "%data_collector.logger.class%" 
     tags: 
      - {name: 'data_collector', priority: '0'} 
     arguments: [@logger] 

    data_collector.ajax: 
     class: 'Symfony\Bundle\FrameworkBundle\DataCollector\AjaxDataCollector' 
     tags: 
      - {name: 'data_collector', priority: '0'} 

    data_collector.twig: 
     class: 'Symfony\Bridge\Twig\DataCollector\TwigDataCollector' 
     tags: 
      - {name: 'data_collector', priority: '0'} 
     arguments: [@twig.profile]