Skip to content

Commit

Permalink
[TypeDeclaration] Deprecate TypedPropertyFromStrictGetterMethodReturn…
Browse files Browse the repository at this point in the history
…TypeRector as depends on missing context and creates invalid code (#5269)
  • Loading branch information
TomasVotruba committed Nov 21, 2023
1 parent b5f7a09 commit a9797fd
Show file tree
Hide file tree
Showing 23 changed files with 13 additions and 688 deletions.
2 changes: 0 additions & 2 deletions config/set/type-declaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use Rector\TypeDeclaration\Rector\Param\ParamTypeFromStrictTypedPropertyRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodReturnTypeRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;

return static function (RectorConfig $rectorConfig): void {
Expand All @@ -51,7 +50,6 @@
AddVoidReturnTypeWhereNoReturnRector::class,
ReturnTypeFromStrictFluentReturnRector::class,
ReturnTypeFromReturnNewRector::class,
TypedPropertyFromStrictGetterMethodReturnTypeRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
ReturnTypeFromStrictBoolReturnExprRector::class,
ReturnTypeFromStrictNativeCallRector::class,
Expand Down
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,7 @@ parameters:
-
path: rules/Transform/Rector/Attribute/AttributeKeyToClassConstFetchRector.php
message: "#Method \"processToClassConstFetch\\(\\)\" returns bool type, so the name should start with is/has/was#"

# deprecated code
- '#Class "Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector" is missing @see annotation with test case class reference#'
- '#Fetching class constant class of deprecated class Rector\\TypeDeclaration\\Rector\\Property\\TypedPropertyFromStrictGetterMethodReturnTypeRector#'

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a9797fd

Please sign in to comment.