Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Renaming] Add generic rename annotation to RenameAnnotationRector #1341

Merged
merged 2 commits into from
Nov 29, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 29, 2021

Closes rectorphp/rector#6824

Now it's possible to rename simple annotations without type:

// rector.php
use Rector\Renaming\Rector\ClassMethod\RenameAnnotationRector;
use Rector\Renaming\ValueObject\RenameAnnotation;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
    $services = $containerConfigurator->services();
    $services->set(RenameAnnotationRector::class)
        ->configure([new RenameAnnotation('psalm-ignore', 'phpstan-ignore')]);
};

@TomasVotruba TomasVotruba merged commit a30b2ef into main Nov 29, 2021
@TomasVotruba TomasVotruba deleted the tv-rename-annotation branch November 29, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change one Annotation to another Annotation
2 participants