I'm finding myself dealing with the same problem in multiple bundles I've wrote.
The problem is that in my
BundleNameBundle
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$modelDir = realpath(__DIR__ . '/Resources/config/doctrine/mappings');
$mappings = [
$modelDir => 'SerendipityHQ\Bundle\QueuesBundle\Model',
];
$ormCompilerClass = DoctrineOrmMappingsPass::class;
if (class_exists($ormCompilerClass)) {
$container->addCompilerPass(
$this->getYamlMappingDriver($mappings)
);
}
$container->addCompilerPass(new DaemonDependenciesPass());
}
__DIR__