Skip to content

[CodeQuality] Deprecate TypeNullableEntityFromDocblockRector - #518

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-type-nullable-entity-from-docblock
Aug 27, 2026
Merged

[CodeQuality] Deprecate TypeNullableEntityFromDocblockRector#518
TomasVotruba merged 1 commit into
mainfrom
deprecate-type-nullable-entity-from-docblock

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

TypeNullableEntityFromDocblockRector is the only non-deprecated rule not part of any set. It is too opinionated and narrow use-cased to belong in a general code-quality set: it blindly forces all entity properties to nullable native types read from docblocks — a niche stepping-stone, not a broadly safe cleanup.

Deprecating it (joins the 4 already-deprecated orphan rules in CodeQuality/Rector/Class_).

Change

  • Rule now implements DeprecatedInterface + @deprecated docblock
  • Test suite removed (matches convention of the other deprecated rules)
-final class TypeNullableEntityFromDocblockRector extends AbstractRector
+/**
+ * @deprecated as too opinionated and narrow use-cased ...
+ */
+final class TypeNullableEntityFromDocblockRector extends AbstractRector implements DeprecatedInterface

@TomasVotruba
TomasVotruba merged commit bb4ccba into main Aug 27, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-type-nullable-entity-from-docblock branch August 27, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant