Skip to content

Commit ecd8b37

Browse files
authored
[Php81] Exclude Doctrine ODM MongoDB Document and EmbeddedDocument from ReadOnlyPropertyRector (#6721)
1 parent 1964b34 commit ecd8b37

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Rector\Tests\Php81\Rector\Property\ReadOnlyPropertyRector\Fixture;
4+
5+
use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
6+
7+
#[Document]
8+
class SkipDoctrineOdmMongodbDocument
9+
{
10+
private int $amount;
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Rector\Tests\Php81\Rector\Property\ReadOnlyPropertyRector\Fixture;
4+
5+
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
6+
7+
#[EmbeddedDocument]
8+
class SkipDoctrineOdmMongodbEmbeddedDocument
9+
{
10+
private int $amount;
11+
}

src/NodeManipulator/PropertyManipulator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
'Doctrine\ORM\Mapping\Table',
4848
'Doctrine\ORM\Mapping\MappedSuperclass',
4949
'Doctrine\ORM\Mapping\Embeddable',
50+
'Doctrine\ODM\MongoDB\Mapping\Annotations\Document',
51+
'Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument',
5052
];
5153

5254
public function __construct(

0 commit comments

Comments
 (0)