title: Symfony 3 - must be an instance of FormFactoryInterface, instance of FormFactory given
body: <p>I want to get my form out of a Service, but whatever I do, it just won't work.</p>
  
  <p>I have the service in the YML</p>
  
  <pre><code>services:      
    myservice:
       class: AppBundle\Service\Myservice
       arguments: ["@doctrine.orm.entity_manager","@form.factory"]
  </code></pre>
  
  <p>then in AppBudle\Service\Myserivce.php:</p>
  
  <pre><code>namespace AppBundle\Service;
  
  use Doctrine\ORM\EntityManager;
  
  use Symfony\Component\Form\FormBuilderInterface;
  
  use Symfony\Component\Form\Extension\Core\Type\TextType;
  
  class Myservice {
  
  protected $em;
  protected $formFactory; 
  
  public function __construct(EntityManager $entityManager, FormFactoryInterface $formFactory) {
      $this-&gt;em = $entityManager;
      $this-&gt;formFactory = $formFactory;
      }   
  
  
  // GENERATE CALCULATOR FORM
  public function generateCalculatorForm() {  
  
  
       return  'ffffsdsd';
      }
  </code></pre>
  
  <p>}</p>
  
  <p>But I get a </p>
  
  <blockquote>
    <p>Catchable Fatal Error: Argument 2 passed to AppBundle\Service\Myservice::__construct() must be an instance of AppBundle\Service\FormFactoryInterface, instance of Symfony\Component\Form\FormFactory given, called in D:\xamp\htdocs\icp\var\cache\dev\appDevDebugProjectContainer.php on line 409 and defined </p>
  </blockquote>
  
  <p>What is wrong here? I already tried almost everything i found on the web, but cant get this working.</p>