I want to create a new reusable bundle with SF4. I followed the documentation but if I add my new bundle inside the "src" directory, there is a conflict with the App namespace and composer autoloading:
"autoload": {
"psr-4": {
"App\\": "src/",
"Acme\\TestBundle\\": "src/Acme/TestBundle/"
}
},
Then, I get this error:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AcmeTestBundle" from namespace "Acme\TestBundle".
I think it's because the PSR-4 autoloader loaded the file with the wrong namespace (App/Acme/TestBundle/AcmeTestBundle.php).
Is there a way to fix this issue? I've also tried to create another bundle for my App but then it crash because of the Kernel.php file...
This fallback directory method doesn't work either:
"psr-4": {
"": "src/"
}
composer dump-autoload? - Andy