Replaces defined old properties by new ones.
-$someObject->someOldProperty;
+$someObject->someNewProperty;
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\PropertyFetch\RenamePropertyRector;
use Rector\Renaming\ValueObject\RenameProperty;
return RectorConfig::configure()
->withConfiguredRule(RenamePropertyRector::class, [
new RenameProperty('SomeClass', 'someOldProperty', 'someNewProperty'),
]);