Find a Rector rule

Find the best Rector rule to solve your problem. Searching through 1136 rules.

Found 4 rules, grouped by set: Clear

doctrine/mongodb-odm 4 matches
RemoveCollectionPerClassInheritanceTypeRector doctrine/mongodb-odm >=2.17 <5.0

Remove deprecated no-op COLLECTION_PER_CLASS inheritance type, every document class is mapped to its own collection by default

 use Doctrine\ODM\MongoDB\Mapping\Attribute as ODM;

 #[ODM\Document]
-#[ODM\InheritanceType('COLLECTION_PER_CLASS')]
 class Section
 {
 }

Replace deprecated aggregation Builder::execute() with getAggregation()->getIterator()

-$result = $builder->execute(['allowDiskUse' => true]);
+$result = $builder->getAggregation(['allowDiskUse' => true])->getIterator();
MappingTypeDeprecatedNameRector doctrine/mongodb-odm >=2.1 <5.0

Replace deprecated "boolean", "integer" and "int_id" mapping types with "bool" and "int"

 use Doctrine\ODM\MongoDB\Mapping\Attribute as ODM;

 #[ODM\Document]
 class Product
 {
-    #[ODM\Field(type: 'boolean')]
+    #[ODM\Field(type: 'bool')]
     public $isActive;
 }
IdGeneratorParentToInterfaceRector doctrine/mongodb-odm >=2.1 <5.0

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
 {
 }