. */ namespace vierbergenlars\AuthserverExternalAccountBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; /** * This is the class that loads and manages your bundle configuration * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} */ class AuthserverExternalAccountExtension extends Extension implements PrependExtensionInterface { /** * {@inheritDoc} */ public function load(array $configs, ContainerBuilder $container) { $servicesDirectory = __DIR__.'/../Resources/config'; $fileLocator = new FileLocator($servicesDirectory); $loader = new Loader\XmlFileLoader($container, $fileLocator); $loader->load('services.xml'); } public function prepend(ContainerBuilder $container) { $container->prependExtensionConfig('security', [ 'providers' => [ 'temporary_user' => [ 'id' => 'vierbergenlars.authserver_external_account.temporary_user_provider' ] ] ]); } }