title: Undefined method 'getDoctrine'.intelephense(1013) Symfony 5
body: <p>I have the following error even i had tried to call Doctrine ORM package in my propertyController. I don't know what i have missed.</p>
  <p><strong>Undefined method 'getDoctrine'.intelephense(1013)</strong></p>
  <pre><code>namespace App\Controller;
  
  use App\Entity\Property;
  use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  use Symfony\Component\HttpFoundation\Response;
  use Symfony\Component\Routing\Annotation\Route;
  use Doctrine\ORM\EntityManagerInterface;
  use  Symfony\Bridge\Doctrine\ManagerRegistry;
  
  
  class propertyController extends AbstractController
  {
      /**
       * @Route(&quot;/billets&quot;,name=&quot;property.index&quot;)
       * @return Response
       */
      public function index():Response{
          
          $repostory= $this-&gt;getDoctrine()-&gt;getRepository(Property::class);
              return $this-&gt;render(&quot;proprety/index.html.twig&quot;,[
                  'current_menu' =&gt; 'properties'
              ]);
      }
  }
  </code></pre>