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 use Test; final class DemoFile { /** * @OA\Property( * example="01112" * ) */ public ?string $uid = null; }
Config
rector.php
<?php use Rector\Config\RectorConfig; use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; use Rector\Php80\ValueObject\AnnotationToAttribute; return RectorConfig::configure() ->withConfiguredRule(AnnotationToAttributeRector::class, [ new AnnotationToAttribute('OpenApi\\Annotations\\Property', 'OpenApi\\Attributes\\Property'), ]);
Run Rector
Rector version:
bf9cc2
- released at 2026-07-28 15:13