Skip to content

Commit

Permalink
Deprecate old NoopRule
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed May 6, 2024
1 parent 8102dae commit 1090835
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,22 @@ parameters:
count: 1
path: tests/PHPStan/Rules/Arrays/AppendedArrayKeyTypeRuleTest.php

-
message: """
#^Instantiation of deprecated class PHPStan\\\\Rules\\\\DeadCode\\\\NoopRule\\:
Replaced by PHPStan\\\\Rules\\\\DeadCode\\\\BetterNoopRule$#
"""
count: 1
path: tests/PHPStan/Rules/DeadCode/NoopRuleTest.php

-
message: """
#^Return type of method PHPStan\\\\Rules\\\\DeadCode\\\\NoopRuleTest\\:\\:getRule\\(\\) has typehint with deprecated class PHPStan\\\\Rules\\\\DeadCode\\\\NoopRule\\:
Replaced by PHPStan\\\\Rules\\\\DeadCode\\\\BetterNoopRule$#
"""
count: 1
path: tests/PHPStan/Rules/DeadCode/NoopRuleTest.php

-
message: "#^PHPDoc tag @var assumes the expression with type PHPStan\\\\Type\\\\Generic\\\\TemplateType is always PHPStan\\\\Type\\\\Generic\\\\TemplateMixedType but it's error\\-prone and dangerous\\.$#"
count: 1
Expand Down
1 change: 1 addition & 0 deletions src/Rules/DeadCode/NoopRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use function sprintf;

/**
* @deprecated Replaced by PHPStan\Rules\DeadCode\BetterNoopRule
* @implements Rule<Node\Stmt\Expression>
*/
class NoopRule implements Rule
Expand Down

0 comments on commit 1090835

Please sign in to comment.