Register bundles from another in Symfony
<p>I'am working on a reusable bundle that will be published on Packagist.</p>

<p>I want make the configuration of the bundle as easy as possible.<br>
But, the bundle uses several 3rd party bundles that involves to be registered.</p>

<p>Actually, this is what I need to do:</p>

<pre><code>// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle(),
            new FOS\UserBundle\FOSUserBundle(),
            new Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle(),
            new Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle(),
            // ...
            new RCH\JWTUserBundle\RCHJWTUserBundle(), // My bundle here
        );

        // ...
    }

    // ...
}
</code></pre>

<p>Is there a way to register the set of bundles by registering only the one I've created ?</p>

<p>Maybe a kind of <code>AppKernel</code> that can be loaded by registering my bundle in the real <code>AppKernel</code> of the application.</p>

<p>If it's not possible, I would appreciate to give me the reason of why.</p>