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

1

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?

Attic answered 12/7, 2018 at 16:22 Comment(0)
W
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

Wahlstrom answered 12/7, 2018 at 16:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.