I created a bundle in symfony4 following the symfony 4 bundle docs
my bundle class is this:
<?php
namespace Infrastructure\Delivery\Frontend\TodoBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class TodoBundle extends Bundle
{
}
and I enabled the bundle in config/bundles.php like this:
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
Infrastructure\Delivery\Frontend\TodoBundle\TodoBundle::class =>['all' => true]
];
when I try to run, the symfony server shows me this error:
(1/1) ClassNotFoundException
Attempted to load class "TodoBundle" from namespace "Infrastructure\Delivery\Frontend\TodoBundle".
Did you forget a "use" statement for another namespace?
I checked over the files many times but i not found where the error is. Anybody can help me?
thanks