l3pp4rd/DoctrineExtensions — Issue #190: Wrong arguments passed
Author: DoneBySimon
Created: 2011-11-10 15:41:37+00:00
State: open

When I implement the Extensions and then I try to generate my Entities, I get a bunch of errors

Catchable fatal error: Argument 1 passed to Gedmo\Mapping\MappedEventSubscriber::loadMetadataForObjectClass() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in [..]/library/DoctrineExtensions/lib/Gedmo/Tree/TreeListener.php on line 195 and defined in [..]/library/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php on line 171

Catchable fatal error: Argument 2 passed to Gedmo\Mapping\MappedEventSubscriber::loadMetadataForObjectClass() must be an instance of Doctrine\Common\Persistence\Mapping\ClassMetadata, instance of Doctrine\ORM\Mapping\ClassMetadataInfo given, called in [..]/library/DoctrineExtensions/lib/Gedmo/Tree/TreeListener.php on line 195 and defined in [..]/library/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php on line 171

Catchable fatal error: Argument 1 passed to Gedmo\Mapping\MappedEventSubscriber::getExtensionMetadataFactory() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in [..]/library/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php on line 173 and defined in /[..]/library/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php on line 130

Catchable fatal error: Argument 1 passed to Gedmo\Mapping\ExtensionMetadataFactory::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in /[..]/library/DoctrineExtensions/lib/Gedmo/Mapping/MappedEventSubscriber.php on line 142 and defined in /[..]/library/DoctrineExtensions/lib/Gedmo/Mapping/ExtensionMetadataFactory.php on line 57

I'm using the latest build (Version 2.2-DEV), XML mapping, and I set the bootstrap as mentioned in https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/tree.md

What goes wrong?