Skip to content

Commit

Permalink
[Php81] Skip Doctrine ORM MappedSuperClass attribute on ReadOnlyPrope…
Browse files Browse the repository at this point in the history
…rtyRector (#2712)

* [Php81] Skip Doctrine ORM MappedSuperClass attribute on ReadOnlyPropertyRector

* Fixed 🎉

* final touch: rename fixture
  • Loading branch information
samsonasik committed Jul 26, 2022
1 parent bd4a732 commit ce22a82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
@@ -0,0 +1,17 @@
<?php

namespace Rector\Tests\Php81\Rector\Property\ReadOnlyPropertyRector\Fixture;

use Doctrine\ORM\Mapping as ORM;

#[ORM\MappedSuperclass]
abstract class SkipEntityMappedSuperClass
{
#[ORM\Column(type: 'string')]
#[ORM\Id]
private string $id;

public function __construct(string $id) {
$this->id = $id;
}
}
1 change: 1 addition & 0 deletions src/NodeManipulator/PropertyManipulator.php
Expand Up @@ -60,6 +60,7 @@ final class PropertyManipulator
private const ALLOWED_NOT_READONLY_ANNOTATION_CLASS_OR_ATTRIBUTES = [
'Doctrine\ORM\Mapping\Entity',
'Doctrine\ORM\Mapping\Table',
'Doctrine\ORM\Mapping\MappedSuperclass',
];

/**
Expand Down

0 comments on commit ce22a82

Please sign in to comment.