Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/refactor/prefer-attribute-over-annotation

Not in any preset. In Rector’s rector-phpunit/annotations-to-attributes, rector-phpunit/composer-based, rector/behat-annotations-to-attributes sets. Unsafe fix: it can change behavior.

What it does

Replace configured PHPDoc annotations (including nested ones) with attributes.

Configuration

[lint.rules]
"refactor/prefer-attribute-over-annotation" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

More lint/refactor rules · Edit this page

Last updated on

Was this page helpful?