title: Class extends unworking with EasyAdmin 3 in Symfony 4
body: <p>I'm trying to make Web App with Symfony and I need an Admin side. But, it won't work and I don't see any answer for my problem on any site. Here we go :</p>
  <p>I have this problem each time I try link a CRUD in my menu :</p>
  <p><code>An exception has been thrown during the rendering of a template (&quot;Unable to find the controller related to the &quot;App\Controller\Admin\Producteur&quot; Entity; did you forget to extend &quot;EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController&quot;?&quot;).</code></p>
  <p>And if I read it carefully I forgot an <code>extends</code> in one of files but I don't see where. More of that, I generate these files with the bundle and I have this error just after that and other people who make the same protocol than me don't have this error.</p>
  <p>I gave you my different files if you see something, because I can't just be blocked and don't finish my internship.</p>
  <p>Producteur.php</p>
  <pre><code>
  namespace App\Entity;
  
  use App\Repository\ProducteurRepository;
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity(repositoryClass=ProducteurRepository::class)
   */
  class Producteur
  {
      /**
       * @ORM\Id
       * @ORM\GeneratedValue
       * @ORM\Column(type=&quot;integer&quot;)
       */
      private $id;
  
      /**
       * @ORM\OneToOne(targetEntity=PtManufacturer::class, cascade={&quot;persist&quot;, &quot;remove&quot;})
       * @ORM\JoinColumn(nullable=false, name=&quot;id_manufacturer&quot;, referencedColumnName=&quot;id_manufacturer&quot;)
       */
      private $Nom;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255)
       */
      private $courriel_User;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255)
       */
      private $courriel_Corresp;
  
      /**
       * @ORM\Column(type=&quot;boolean&quot;)
       */
      private $TVA_Appl;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=20)
       */
      private $Num_TVA;
  
      /**
       * @ORM\Column(type=&quot;text&quot;)
       */
      private $Pied_De_Doc;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255)
       */
      private $adresse1_E;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255, nullable=true)
       */
      private $adresse2_E;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=5)
       */
      private $CP_E;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=100)
       */
      private $Ville_E;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255)
       */
      private $adresse1_F;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=255, nullable=true)
       */
      private $adresse2_F;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=5)
       */
      private $CP_F;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=100)
       */
      private $Ville_F;
  
      /**
       * @ORM\Column(type=&quot;string&quot;, length=50)
       */
      private $Num_Tel;
  
      public function getId(): ?int
      {
          return $this-&gt;id;
      }
  
      public function getNom(): ?PtManufacturer
      {
          return $this-&gt;Nom;
      }
  
      public function setNom(PtManufacturer $Nom): self
      {
          $this-&gt;Nom = $Nom;
  
          return $this;
      }
  
      public function getCourrielUser(): ?string
      {
          return $this-&gt;courriel_User;
      }
  
      public function setCourrielUser(string $courriel_User): self
      {
          $this-&gt;courriel_User = $courriel_User;
  
          return $this;
      }
  
      public function getCourrielCorresp(): ?string
      {
          return $this-&gt;courriel_Corresp;
      }
  
      public function setCourrielCorresp(string $courriel_Corresp): self
      {
          $this-&gt;courriel_Corresp = $courriel_Corresp;
  
          return $this;
      }
  
      public function getTVAAppl(): ?bool
      {
          return $this-&gt;TVA_Appl;
      }
  
      public function setTVAAppl(bool $TVA_Appl): self
      {
          $this-&gt;TVA_Appl = $TVA_Appl;
  
          return $this;
      }
  
      public function getNumTVA(): ?string
      {
          return $this-&gt;Num_TVA;
      }
  
      public function setNumTVA(string $Num_TVA): self
      {
          $this-&gt;Num_TVA = $Num_TVA;
  
          return $this;
      }
  
      public function getPiedDeDoc(): ?string
      {
          return $this-&gt;Pied_De_Doc;
      }
  
      public function setPiedDeDoc(string $Pied_De_Doc): self
      {
          $this-&gt;Pied_De_Doc = $Pied_De_Doc;
  
          return $this;
      }
  
      public function getAdresse1E(): ?string
      {
          return $this-&gt;adresse1_E;
      }
  
      public function setAdresse1E(string $adresse1_E): self
      {
          $this-&gt;adresse1_E = $adresse1_E;
  
          return $this;
      }
  
      public function getAdresse2E(): ?string
      {
          return $this-&gt;adresse2_E;
      }
  
      public function setAdresse2E(?string $adresse2_E): self
      {
          $this-&gt;adresse2_E = $adresse2_E;
  
          return $this;
      }
  
      public function getCPE(): ?string
      {
          return $this-&gt;CP_E;
      }
  
      public function setCPE(string $CP_E): self
      {
          $this-&gt;CP_E = $CP_E;
  
          return $this;
      }
  
      public function getVilleE(): ?string
      {
          return $this-&gt;Ville_E;
      }
  
      public function setVilleE(string $Ville_E): self
      {
          $this-&gt;Ville_E = $Ville_E;
  
          return $this;
      }
  
      public function getAdresse1F(): ?string
      {
          return $this-&gt;adresse1_F;
      }
  
      public function setAdresse1F(string $adresse1_F): self
      {
          $this-&gt;adresse1_F = $adresse1_F;
  
          return $this;
      }
  
      public function getAdresse2F(): ?string
      {
          return $this-&gt;adresse2_F;
      }
  
      public function setAdresse2F(?string $adresse2_F): self
      {
          $this-&gt;adresse2_F = $adresse2_F;
  
          return $this;
      }
  
      public function getCPF(): ?string
      {
          return $this-&gt;CP_F;
      }
  
      public function setCPF(string $CP_F): self
      {
          $this-&gt;CP_F = $CP_F;
  
          return $this;
      }
  
      public function getVilleF(): ?string
      {
          return $this-&gt;Ville_F;
      }
  
      public function setVilleF(string $Ville_F): self
      {
          $this-&gt;Ville_F = $Ville_F;
  
          return $this;
      }
  
      public function getNumTel(): ?string
      {
          return $this-&gt;Num_Tel;
      }
  
      public function setNumTel(string $Num_Tel): self
      {
          $this-&gt;Num_Tel = $Num_Tel;
  
          return $this;
      }
  }
  </code></pre>
  <p>ProducteurCrudController.php</p>
  <pre><code>
  namespace App\Controller\Admin;
  
  use App\Entity\Producteur;
  use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
  
  class ProducteurCrudController extends AbstractCrudController
  {
      public static function getEntityFqcn(): string
      {
          return Producteur::class;
      }
  
      /*
      public function configureFields(string $pageName): iterable
      {
          return [
              IdField::new('id'),
              TextField::new('title'),
              TextEditorField::new('description'),
          ];
      }
      */
  }
  </code></pre>
  <p>DashboardController.php</p>
  <pre><code>
  namespace App\Controller\Admin;
  
  use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
  use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
  use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
  use Symfony\Component\HttpFoundation\Response;
  use Symfony\Component\Routing\Annotation\Route;
  
  class DashboardController extends AbstractDashboardController
  {
      /**
       * @Route(&quot;/admin&quot;, name=&quot;admin&quot;)
       */
      public function index(): Response
      {
          return parent::index();
      }
  
      public function configureDashboard(): Dashboard
      {
          return Dashboard::new()
              -&gt;setTitle('Backoffice');
      }
  
      public function configureMenuItems(): iterable
      {
          return[
              MenuItem::linktoDashboard('Dashboard', 'fa fa-home'),
              MenuItem::linkToCrud('Producteur', 'fas fa-list', Producteur::class),
          ];
      }
  }
  </code></pre>
  <p>menu.html.twig</p>
  <pre><code>{% macro render_menu_item(item) %}
      {% if item.isMenuSection %}
          {% if item.icon is not empty %}&lt;i class=&quot;menu-icon fa-fw {{ item.icon }}&quot;&gt;&lt;/i&gt;{% endif %}
          &lt;span class=&quot;{{ item.cssClass }}&quot;&gt;{{ item.label }}&lt;/span&gt;
      {% else %}
          &lt;a href=&quot;{{ item.linkUrl }}&quot; class=&quot;{{ item.cssClass }}&quot; target=&quot;{{ item.linkTarget }}&quot; rel=&quot;{{ item.linkRel }}&quot; referrerpolicy=&quot;origin-when-cross-origin&quot;&gt;
              {% if item.icon is not empty %}&lt;i class=&quot;menu-icon fa-fw {{ item.icon }}&quot;&gt;&lt;/i&gt;{% endif %}
              &lt;span&gt;{{ item.label|raw }}&lt;/span&gt;
              {% if item.hasSubItems %}&lt;i class=&quot;fa fa-fw fa-angle-right treeview-icon&quot;&gt;&lt;/i&gt;{% endif %}
          &lt;/a&gt;
      {% endif %}
  {% endmacro %}
  
  {% block main_menu_before %}{% endblock %}
  
  &lt;ul class=&quot;sidebar-menu&quot; data-widget=&quot;tree&quot; data-animation-speed=&quot;250&quot;&gt;
      {% block main_menu %}
          {% for menuItem in ea.mainMenu.items %}
              {% block menu_item %}
                  &lt;li class=&quot;{{ menuItem.isMenuSection ? 'header' }} {{ menuItem.hasSubItems ? 'treeview' }} {{ ea.mainMenu.isSelected(menuItem) ? 'active' }} {{ ea.mainMenu.isExpanded(menuItem) ? 'active submenu-active' }}&quot;&gt;
                      {{ _self.render_menu_item(menuItem) }}
  
                      {% if menuItem.hasSubItems %}
                          &lt;ul class=&quot;treeview-menu&quot;&gt;
                              {% for menuSubItem in menuItem.subItems %}
                                  {% block menu_subitem %}
                                      &lt;li class=&quot;{{ menuSubItem.isMenuSection ? 'header' }} {{ ea.mainMenu.isSelected(menuSubItem) ? 'active' }}&quot;&gt;
                                          {{ _self.render_menu_item(menuSubItem) }}
                                      &lt;/li&gt;
                                  {% endblock menu_subitem %}
                              {% endfor %}
                          &lt;/ul&gt;
                      {% endif %}
                  &lt;/li&gt;
              {% endblock menu_item %}
          {% endfor %}
      {% endblock main_menu %}
  &lt;/ul&gt;
  
  {% block main_menu_after %}{% endblock %}
  </code></pre>
  <p>Thanks in advance for your help.</p>