-2

To install EasyAdmin Bundle, I need to enable the bundle in app/AppKernel.php but I don't find it ! Please help !

Thanks !!!

2nssy
  • 1
  • 2

2 Answers2

1

Symfony 4 introduced a new composer plugin called flex:
https://symfony.com/doc/current/setup/flex.html

Install EasyAdminBundle with composer req admin will automatically configure defaults and also add the bundle to bundles.php file.

No more manual steps required afterwards, just add the new file to git.

mblaettermann
  • 1,916
  • 2
  • 17
  • 23
0

In Symfony4 there's no app/ folder by default, the structure is different from previous Symfony releases.

You have to add your bundle to config/bundles.php. The kernel class should be in src/Kernel.php.

To learn more: http://fabien.potencier.org/symfony4-directory-structure.html

diegowc
  • 455
  • 2
  • 14
  • But I'm lost ! In my file bundle.php, easyadmin is enable. In the doc of Symfony, we have a new class EasyAdminBundle in a array ($bundles) and where do I have to add it ? – 2nssy Sep 21 '18 at 11:05
  • The `src/Kernel.php` class is in charge of loading the bundles from that array. Look at the `Kernel` method `registerBundles()`. – diegowc Sep 21 '18 at 11:42