How can I write a symfony bundle which relies on Doctrine and provides entities?
<p>I am trying to write a mail-queue bundle for storing e-mail events into a location and retreive them later and process them, as we do not use a service like mandrill or likewise.</p>

<p>That for (and my exact usecase is not of real interest here), I like to provide additional entities in my bundle, as my bundle ships a BufferedDatabaseMailQueue. </p>

<p>Due to some research I included the following (yet untested) lines in the config.yml of my bundle:</p>

<pre><code>doctrine:
orm:
    auto_mapping: false
    mappings:
       AcmeDemoBundle:
          type: annotation
          alias: MyMailQueueBundle
          prefix: MyMailQueueBundle\Entity
          dir: %kernel.root_dir%/../src/MyMailQueueBundle/Entity
          is_bundle: true
</code></pre>

<p>Anyways I end up with this error message:</p>

<blockquote>
  <p>InvalidArgumentException in YamlFileLoader.php line 404: There is no
  extension able to load the configuration for "doctrine"</p>
</blockquote>

<p>Research indicated, that the <a href="https://symfony.com/doc/current/bundles/prepend_extension.html" rel="nofollow">PrependExtensionInterface</a> might somehow help me. But I do not know how to correctly use and configure it. So that my Bundle can be based on doctrine.</p>

<p>How do I do that?</p>