Estoy trabajando en Symfony 2 y estoy tratando de usar FOSUserBundle
pero no puedo resolver este problema: ayuda por favor
[LogicException]
Bundle "BlogUserBundle" extends bundle "FOSUserBundle",
which is not registered.
<?php
use SymfonyComponentHttpKernelKernel;
use SymfonyComponentConfigLoaderLoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new SymfonyBundleFrameworkBundleFrameworkBundle(),
new SymfonyBundleSecurityBundleSecurityBundle(),
new SymfonyBundleTwigBundleTwigBundle(),
new SymfonyBundleMonologBundleMonologBundle(),
new SymfonyBundleSwiftmailerBundleSwiftmailerBundle(),
new SymfonyBundleAsseticBundleAsseticBundle(),
new DoctrineBundleDoctrineBundleDoctrineBundle(),
new SensioBundleFrameworkExtraBundleSensioFrameworkExtraBundle(),
new AppBundleAppBundle(),
new FOSUserBundleFOSUserBundle(),
new BlogUserBundleBlogUserBundle(),
);
if (in_array($this->getEnvironment(), array("dev", "test"))) {
$bundles[] = new SymfonyBundleWebProfilerBundleWebProfilerBundle();
$bundles[] = new SensioBundleDistributionBundleSensioDistributionBundle();
$bundles[] = new SensioBundleGeneratorBundleSensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__."/config/config_".$this->getEnvironment().".yml");
}
}
Respuestas
0 para la respuesta № 1Parece que te olvidaste de agregar new FOSUserBundleFOSUserBundle()
, aplicación / AppKernel.php método registerBundles.
0 para la respuesta № 2
Añadir new FOSUserBundleFOSUserBundle(),
después de tu línea new AppBundleAppBundle(),
en la aplicación / AppKernel.php.