Skip to content

[TypeDeclaration] Deprecate ArrayShapeFromConstantArrayReturnRector as uses docblocks that we move away from since 0.15#4571

Merged
TomasVotruba merged 1 commit intomainfrom
tv-depre-array-shape
Jul 21, 2023
Merged

[TypeDeclaration] Deprecate ArrayShapeFromConstantArrayReturnRector as uses docblocks that we move away from since 0.15#4571
TomasVotruba merged 1 commit intomainfrom
tv-depre-array-shape

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Jul 21, 2023

Since Rector 0.15 we move away from rules that create docblock types. Those types could create false feeling, that type is known and strict, while actually it's just text. Our goal is to use strict-type-based rules only, so we can trust the result and inter other types based on those.

Also in this particular case of array shapes, the best practise is to use value object with known types and validation 👍

This rule belongs to the group that was removed in 0.15, so this is cleanup of a forgotten left-over.
https://getrector.com/blog/new-in-rector-015-complete-safe-and-known-type-declarations

@TomasVotruba TomasVotruba force-pushed the tv-depre-array-shape branch from ead873d to f44778a Compare July 21, 2023 13:58
…s uses docblocks that we move away from since 0.15
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.

1 participant