Skip to content

Commit 1090835

Browse files
committed
Deprecate old NoopRule
1 parent 8102dae commit 1090835

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

phpstan-baseline.neon

+16
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,22 @@ parameters:
18241824
count: 1
18251825
path: tests/PHPStan/Rules/Arrays/AppendedArrayKeyTypeRuleTest.php
18261826

1827+
-
1828+
message: """
1829+
#^Instantiation of deprecated class PHPStan\\\\Rules\\\\DeadCode\\\\NoopRule\\:
1830+
Replaced by PHPStan\\\\Rules\\\\DeadCode\\\\BetterNoopRule$#
1831+
"""
1832+
count: 1
1833+
path: tests/PHPStan/Rules/DeadCode/NoopRuleTest.php
1834+
1835+
-
1836+
message: """
1837+
#^Return type of method PHPStan\\\\Rules\\\\DeadCode\\\\NoopRuleTest\\:\\:getRule\\(\\) has typehint with deprecated class PHPStan\\\\Rules\\\\DeadCode\\\\NoopRule\\:
1838+
Replaced by PHPStan\\\\Rules\\\\DeadCode\\\\BetterNoopRule$#
1839+
"""
1840+
count: 1
1841+
path: tests/PHPStan/Rules/DeadCode/NoopRuleTest.php
1842+
18271843
-
18281844
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\\.$#"
18291845
count: 1

src/Rules/DeadCode/NoopRule.php

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use function sprintf;
1111

1212
/**
13+
* @deprecated Replaced by PHPStan\Rules\DeadCode\BetterNoopRule
1314
* @implements Rule<Node\Stmt\Expression>
1415
*/
1516
class NoopRule implements Rule

0 commit comments

Comments
 (0)