IdGeneratorParentToInterfaceRector
Replace deprecated empty AbstractIdGenerator parent with IdGenerator interface
use Doctrine\ODM\MongoDB\Id\AbstractIdGenerator;
-final class CustomIdGenerator extends AbstractIdGenerator
+final class CustomIdGenerator implements \Doctrine\ODM\MongoDB\Id\IdGenerator
{
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Doctrine\Odm21\Rector\Class_\IdGeneratorParentToInterfaceRector;
return RectorConfig::configure()
->withRules([
IdGeneratorParentToInterfaceRector::class,
]);
PACKAGE:
doctrine/mongodb-odm >=2.1 <5.0