5

I want to register a bundle in the AppKernel Class in Symfony 4 according to this tutorial:

https://symfony.com/doc/3.3/bundles.html

But I do not find a folder "app", and also not the file AppKernel.php, so not the class AppKernel. Did I made a mistake by the Symfony installation or do I need to create an app folder by myself?

Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97
peace_love
  • 6,229
  • 11
  • 69
  • 157

1 Answers1

13

The structure of Symfony 4 is different with Symfony 3

if you want to enable bundle in your application you must change config/bundles.php file

something like this

    // config/bundles.php
    return [
        // 'all' means that the bundle is enabled for any Symfony environment
        Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
        Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
        Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
.
.
.

    ];

for more information see this tutorial

pedram shabani
  • 1,654
  • 2
  • 20
  • 30