KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 287 forks source link

Fix phpstan behaviors to allow an interface inherited from TranslatableInterface #706

Closed nicolassing closed 2 years ago

nicolassing commented 2 years ago

If I use my own TranslatableInterface instead of the one provided by the bundle, phpstan throw an error.

Here an example

use Acme\Contract\TranslatableInterface;

class Product implements TranslatableInterface
{
}
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface as KnpTranslatableInterface;

interface TranslatableInterface extends KnpTranslatableInterface
{
}

Thx !

PS: Sorry I've closed the previous PR (#695) after a mistake :sweat:

TomasVotruba commented 2 years ago

Thank you, great job :+1: