Try Rector
Documentation
Hire Team
Blog
Contact
Try Rector
Documentation
Hire Team
Blog
Contact
Run Rector on your code to see what it can do for you:
// no change
PHP snippet to change
<?php trait DemoTrait { public function runSomething(): int { return 1; } } abstract class DemoParent { use DemoTrait; } final class DemoFile extends DemoParent { public function runSomething(): int { return 2; } }
Config
rector.php
<?php use Rector\Config\RectorConfig; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; return RectorConfig::configure() ->withConfiguredRule(AddOverrideAttributeToOverriddenMethodsRector::class, [ 'allow_override_empty_method' => true, ]) ->withPhpVersion(80300);
Run Rector
Rector version:
78e99a
- released at 2026-06-05 21:27