FabienPennequin / FPNTagBundle

This bundle allows to tag your Doctrine entities easily
http://knpbundles.com/FabienPennequin/FPNTagBundle
76 stars 50 forks source link

sf2.1 error? #14

Closed vittore closed 10 years ago

vittore commented 11 years ago

All done as documentation (with annotations) but i get this error:

Catchable Fatal Error: Argument 1 passed to DoctrineExtensions\Taggable\TagManager::loadTagging() must be an instance of DoctrineExtensions\Taggable\Taggable, instance of Acme\TagBundle\Entity\Document given, called in /project/src/Acme/TagBundle/Controller/DocumentController.php on line 111 and defined in /project/vendor/fpn/doctrine-extensions-taggable/lib/DoctrineExtensions/Taggable/TagManager.php line 201

Plus, when I send php app/console doctrine:generate:entities Acme I get this:

Generating entities for namespace "Acme"
[ErrorException]
Runtime Notice: Declaration of Acme\TagBundle\Entity\Tagging::setTag() should be compatible with DoctrineExtensions\Taggable\Entity\Tagging::setTag(DoctrineExtensions\Taggable\Entity\Tag $tag) in /projects/bazar/project/src/Acme/TagBundle/Entity/Tagging.php line 22

May you help me?

v.

vittore commented 11 years ago

Implement Taggable interface in Document entity

Class Document implements Taggable{
...
}

Resolve first error.

jbouzekri commented 10 years ago

This is a problem of a wrong implementation of an interface or in an inheritance.