diff --git a/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/multiline_2.php.inc b/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/multiline_2.php.inc new file mode 100644 index 00000000000..990fa87f11e --- /dev/null +++ b/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/multiline_2.php.inc @@ -0,0 +1,45 @@ + + * + * @ORM\OrderBy({ + * "createdAt": "DESC", + * }) + * + * @ORM\OneToMany(targetEntity=Foo::class, mappedBy="user", orphanRemoval=true) + */ + private Collection $foos; +} + +?> +----- + + * + * + */ + #[\Doctrine\ORM\Mapping\OrderBy(['createdAt' => 'DESC'])] + #[\Doctrine\ORM\Mapping\OneToMany(targetEntity: Foo::class, mappedBy: 'user', orphanRemoval: true)] + private Collection $foos; +} + +?> diff --git a/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/config/configured_rule.php b/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/config/configured_rule.php index 29f0296d389..28aafdb4746 100644 --- a/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/config/configured_rule.php +++ b/rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/config/configured_rule.php @@ -22,6 +22,8 @@ new AnnotationToAttribute('Doctrine\ORM\Mapping\Table'), new AnnotationToAttribute('Doctrine\ORM\Mapping\Id'), new AnnotationToAttribute('Doctrine\ORM\Mapping\Column'), + new AnnotationToAttribute('Doctrine\ORM\Mapping\OrderBy'), + new AnnotationToAttribute('Doctrine\ORM\Mapping\OneToMany'), new AnnotationToAttribute('ApiPlatform\Core\Annotation\ApiResource'), ]), ]]);