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 #695

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 !

nicolassing commented 2 years ago

To be honest I don't know how to fix the Rector failed test :pleading_face:

TomasVotruba commented 2 years ago

Try running the same command without --dry-run:

vendor/bin/rector process