I am using Symfony 5.3. I have 2 separate repositories I would like to use in my application.
composer.json file in my application looks like this.
"require": {
"bundlezone/emailer": "dev-release/develop-setup",
"bundlezone/tester": "dev-master"
}
And the composer file in Emailer Repository looks like this.
"autoload" : {
"psr-4" : {
"BundleZone\\Emailer\\" : [""],
"": ["Emailer"]
}
},
And the composer file in Tester Repository looks like this.
"autoload" : {
"psr-4" : {
"BundleZone\\Tester\\" : [""],
"": ["Tester"]
}
},
And Emailer Repository has multiple bundles. EmailBundle.php code looks like this.
<?php
namespace EmailBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class EmailBundle extends Bundle
{
}
And I added the class to the config/bundles.php.
\EmailBundle\EmailBundle::class => ['all' => true],
But, it still throws the below error.
Attempted to load class "EmailBundle" from namespace "EmailBundle". Did you forget a "use" statement for another namespace?
Can someone please point out what I am doing wrong here?