title: Is it correct to use service like this in Symfony 3.4?
body: <p>So is this allowed to use or is it better to inject the service in the controller's constructor? I know there is a better way, but for the sake of laziness can I do that?</p>
  
  <pre><code>class someController extends Controller 
  {
      /**
       * @Route("/test")
       */
      public function someFunction() 
      {
          $manager = $this-&gt;getDoctrine();
          $service = new someService($manager);
  
          $all =  $service-&gt;getAll();
          dump($all);exit;
      }
  }
  
  
  ------------------------------------------------
  use Doctrine\Common\Persistence\ManagerRegistry;
  
  class someService implements someServiceInterface 
  {
     /**
      * @var ManagerRegistry
      */
      private $manager;
  
      public function __construct($manager)
      {
          $this-&gt;manager = $manager;
      }
  
      public function getAll() 
      {
          return $this-&gt;manager-&gt;getRepository(SomeEntity::class)-&gt;findAll();
      }
  }
  </code></pre>