Skip to content

Commit 692ea39

Browse files
committed
wip
1 parent 4c0e44a commit 692ea39

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/upgrade/src/tempest2.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
use Rector\Config\RectorConfig;
44
use Rector\Renaming\Rector\Name\RenameClassRector;
5+
use Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector;
6+
use Rector\Renaming\ValueObject\RenameProperty;
57

68
return static function (RectorConfig $config) : void {
79
$config->removeUnusedImports();
810
$config->importNames();
911
$config->importShortClasses();
12+
1013
$config->ruleWithConfiguration(RenameClassRector::class, [
1114
'Tempest\\Database\\Id' => 'Tempest\\Database\\PrimaryKey',
1215
'Tempest\\CommandBus\\AsyncCommand' => 'Tempest\\CommandBus\\Async',
1316
]);
17+
18+
$config->ruleWithConfiguration(RenamePropertyRector::class, [
19+
new RenameProperty(
20+
type: 'Tempest\\Database\\PrimaryKey',
21+
oldProperty: 'id',
22+
newProperty: 'value'
23+
)
24+
]);
1425
};

0 commit comments

Comments
 (0)