title: Deprecation warning in Symfony 2.7
body: <p>I recently updated to Symfony 2.7 and ran into this issue. It is giving me this deprecation error.</p>
  
  <pre><code>Symfony\Component\DependencyInjection\Definition::setFactoryMethod(getRepository) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead
  
  Symfony\Component\DependencyInjection\Definition::setFactoryService(doctrine.orm.entity_manager) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead
  </code></pre>
  
  <p>Seems like culprit is this configuration.</p>
  
  <pre><code>ac_queue.failed.job.repository:
      class: Acme\Bundle\QueueBundle\Repository\FailedJob
      factory_service: doctrine.orm.entity_manager
      factory_method: getRepository
      arguments: ['AcmeQueueBundle:FailedJob']
      public: false
  </code></pre>
  
  <p>What is the right way to do this now in Symfony 2.7 now?</p>