Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
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:
e040c5
- released at 2026-01-11 00:45