I create a bundle like this
<?php
namespace CDC\Basement\Bundle\UtilBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class CDCUtilBundle extends Bundle {}
and add composer.json file on root directory of my bundle folder, and put this in autoload
"psr-4": { "CDC\\Basement\\Bundle\\UtilBundle\\": "src/" },
the main class located in /src folder.
After I run composer dump-autoload
command, but I get this error:
Attempted to load class "CDCUtilBundle" from namespace "CDC\Basement\Bundle\UtilBundle".
Did you forget a "use" statement for another namespace?
If I understood correctly after command run, the new namespace should be added in autoload_psr4.php and autoload_static.php (vendor/composer/) , also in main composer.json too like other bundles https://prnt.sc/r9rwss.
What did I do wrong ? Maybe I forgot add somewhere configs or I need to run other commands too ?