MappingTypeDeprecatedNameRector
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;
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Doctrine\Odm21\Rector\Attribute\MappingTypeDeprecatedNameRector;
return RectorConfig::configure()
->withRules([
MappingTypeDeprecatedNameRector::class,
]);
PACKAGE:
doctrine/mongodb-odm >=2.1 <5.0