RemoveCollectionPerClassInheritanceTypeRector

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

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Doctrine\Odm217\Rector\Class_\RemoveCollectionPerClassInheritanceTypeRector;

return RectorConfig::configure()
    ->withRules([
        RemoveCollectionPerClassInheritanceTypeRector::class,
    ]);
PACKAGE:  doctrine/mongodb-odm >=2.17 <5.0

Other rules in the doctrine/mongodb-odm set