Hi,
I'm encoutering a problem, but really don't understand why!
I get this error when launching Symfony ( via front controller or CLI )
PHP Fatal error: Declaration of ECommerceKernel::registerContainerConfiguration() must be compatible with that of Symfony\Framework\Kernel::registerContainerConfiguration()
The problem is the override of the registerContainerConfiguration method.
It's signature is defined in Symfony\Framework\Kernel:
abstract public function registerContainerConfiguration(LoaderInterface $loader);
my overwritten method looks like this:
// in ECommerceKernel
public function registerContainerConfiguration(LoaderInterface $loader)
{
$return = $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
$em = $this->getContainer()->getDoctrine_Orm_EntityManagerService();
$dm = $this->getContainer()->getDoctrine_Odm_Mongodb_DocumentManagerService();
$eventManager = $em->getEventManager();
$eventManager->addEventListener(
array(\Doctrine\ORM\Events::postLoad), new ECommerceEventSubscriber($dm)
);
return $return;
}
My question: Whats the f**k is happening here ? I really can't undertand the error cause method signatures are exactly the same.
this happened after a srv/vendor/symfony upgrade to the latest github's symfony/symfony.
Thanks, Florian.