Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find app/AppKernel.php in Symfony 4?

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?

like image 946
peace_love Avatar asked Jul 12 '18 16:07

peace_love


1 Answers

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

like image 58
pedram shabani Avatar answered Nov 19 '22 03:11

pedram shabani