Skip to content

Commit 446baee

Browse files
committed
Skip Rector rule for Doctrine entities: ClassPropertyAssignToConstructorPromotionRector
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
1 parent 54ec693 commit 446baee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rector.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6+
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
67

78
return RectorConfig::configure()
89
->withCache(__DIR__ . '/var/cache/rector')
@@ -24,4 +25,8 @@
2425
symfony: true,
2526
doctrine: true,
2627
phpunit: true,
27-
);
28+
)
29+
->withSkip([
30+
// Exclude promotion of properties to the constructor for Doctrine entities
31+
ClassPropertyAssignToConstructorPromotionRector::class => [__DIR__ . '/src/Doctrine/Entity'],
32+
]);

0 commit comments

Comments
 (0)