diff --git a/rules-tests/CodeQuality/Rector/Class_/YamlToAnnotationsDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml b/rules-tests/CodeQuality/Rector/Class_/YamlToAnnotationsDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml index b8921fdb..a98025f0 100644 --- a/rules-tests/CodeQuality/Rector/Class_/YamlToAnnotationsDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml +++ b/rules-tests/CodeQuality/Rector/Class_/YamlToAnnotationsDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml @@ -3,3 +3,4 @@ Rector\Doctrine\Tests\CodeQuality\Rector\Class_\YamlToAnnotationsDoctrineMapping inner: class: App\Currency columnPrefix: "currency_" + nullable: true diff --git a/rules/CodeQuality/AnnotationTransformer/PropertyAnnotationTransformer/EmbeddedPropertyAnnotationTransformer.php b/rules/CodeQuality/AnnotationTransformer/PropertyAnnotationTransformer/EmbeddedPropertyAnnotationTransformer.php index fabf5f3b..ec95a099 100644 --- a/rules/CodeQuality/AnnotationTransformer/PropertyAnnotationTransformer/EmbeddedPropertyAnnotationTransformer.php +++ b/rules/CodeQuality/AnnotationTransformer/PropertyAnnotationTransformer/EmbeddedPropertyAnnotationTransformer.php @@ -25,6 +25,8 @@ public function transform(EntityMapping $entityMapping, PhpDocInfo $propertyPhpD return; } + unset($propertyMapping['nullable']); + $arrayItemNodes = $this->arrayItemNodeFactory->create($propertyMapping, ['class', 'columnPrefix']); $spacelessPhpDocTagNode = DocTagNodeFactory::createSpacelessPhpDocTagNode(