Creé un nuevo paquete con la aplicación/consola. Estoy tratando de imprimir un saludo sencillo, así puedo continuar. Me cargan automáticamente el espacio de nombres, registrada el paquete, creé una página, pero Symfony detecta una excepción:Paquete Symfony2 no registrado
Bundle "PageBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file?
Pero ya he hecho eso.
El registro muestra:
[2011-06-08 23:41:56] request.CRITICAL: InvalidArgumentException: Bundle "PageBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file? (uncaught exception) at /Applications/MAMP/htdocs/Symfony/app/bootstrap.php.cache line 634
También borra la carpeta dev caché. ¿Alguien puede ayudarme a descubrir qué está mal? He hecho esto antes, es la primera vez que tengo este problema. Algo que ver con bootstrap.php.cache
¡Gracias! Aprecia toda la ayuda.
CÓDIGO:
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Webmuch\PageBundle\WebmuchPageBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Symfony\Bundle\WebConfiguratorBundle\SymfonyWebConfiguratorBundle();
}
return $bundles;
}
El haz de muestra también como un paquete activo en el generador de perfiles.
Eliminé los archivos de caché y de arranque. A continuación, reconstruyó el archivo bootstrap de la consola. Todavía el mismo error. ¿Qué me estoy perdiendo? – Aayush
Muéstrenos su función registerBundles(). –
Lo he agregado a la pregunta. ¡Gracias! – Aayush