Skip to content

[dx] add "treat classes as final" option, to enable more advanced level of rules without making every class explicitly final #9213

Open
@TomasVotruba

Description

@TomasVotruba

This should be an optional feature, off by default. When enabled, rules like AddTypeToConstRector should run even on final classes.
Devs often want to use more such type coverage features in Rector, but making everything final is way too much work just to try it out.

Let's make upgrades a bit more easier by adding this option 🤗

return RectorConfig::configure()
    ->treatClassesAsFinal()

@samsonasik Could you kick this off?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions