Skip to content

Is there a possibility to skip a rule based on class attribute? #8694

Answered by TomasVotruba
tad56 asked this question in Q&A
Discussion options

You must be logged in to vote

I see. In that case it's better to use the skip feature suggested by @samsonasik

I do this for some other rules, that I personally don't like in entities:

$rector->withSkip([
    ClassPropertyAssignToConstructorPromotionRector::class => '*/Entity/*',
]);

This is the best and easiest way I can think of 👍

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
8 replies
@tad56
Comment options

@TomasVotruba
Comment options

@tad56
Comment options

@TomasVotruba
Comment options

Answer selected by TomasVotruba
@tad56
Comment options

@TomasVotruba
Comment options

Comment options

You must be logged in to vote
5 replies
@TomasVotruba
Comment options

@uncaught
Comment options

@uncaught
Comment options

@TomasVotruba
Comment options

@uncaught
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants