Skip to content

Commit b593dde

Browse files
committed
[BE] Check variance of template types in properties
1 parent 293fbca commit b593dde

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Major new features 🚀
2121
* Check preg_quote delimiter sanity (level 0) ([#3252](https://github.com/phpstan/phpstan-src/pull/3252)), #11338, thanks @staabm!
2222
* Rule for `call_user_func()` (level 5) ([#2479](https://github.com/phpstan/phpstan-src/pull/2479)), thanks @staabm!
2323
* Check array functions which require stringish values (level 5) ([#3132](https://github.com/phpstan/phpstan-src/pull/3132)), #11141, #5848, #3694, #11111, thanks @schlndh!
24+
* Check variance of template types in properties (level 2) ([#2314](https://github.com/phpstan/phpstan-src/pull/2314)), thanks @jiripudil!
2425
* ArrayUnpackingRule (level 3) ([#856](https://github.com/phpstan/phpstan-src/pull/856)), thanks @canvural!
2526
* Check unresolvable parameters (level 5) ([#1319](https://github.com/phpstan/phpstan-src/pull/1319)), thanks @rvanvelzen!
2627
* Enforce `@no-named-arguments` (level 5) (https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), #5968
@@ -65,7 +66,6 @@ Bleeding edge (TODO move to other sections)
6566
* Always report always true conditions, except for last elseif and match arm ([#2105](https://github.com/phpstan/phpstan-src/pull/2105)), thanks @staabm!
6667
* Disable "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule
6768
* Because "always true" is always reported, these are no longer needed
68-
* Check variance of template types in properties ([#2314](https://github.com/phpstan/phpstan-src/pull/2314)), thanks @jiripudil!
6969
* Report narrowing `PHPStan\Type\Type` interface via `@var` (https://github.com/phpstan/phpstan-src/commit/713b98fb107213c28e3d8c8b4b43c5f5fc47c144), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389
7070
* Check invalid PHPDocs in previously unchecked statement types (https://github.com/phpstan/phpstan-src/commit/9780d352f3264aac09ac7954f691de1877db8e01)
7171
* InvalidPHPStanDocTagRule in StubValidator (https://github.com/phpstan/phpstan-src/commit/9c2552b7e744926d1a74c1ba8fd32c64079eed61)

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ parameters:
1313
alwaysCheckTooWideReturnTypeFinalMethods: true
1414
alwaysTrueAlwaysReported: true
1515
disableUnreachableBranchesRules: true
16-
propertyVariance: true
1716
magicConstantOutOfContext: true
1817
pure: true
1918
uselessReturnValue: true

conf/config.level2.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ conditionalTags:
6868
phpstan.rules.rule: %featureToggles.illegalConstructorMethodCall%
6969
PHPStan\Rules\Methods\IllegalConstructorStaticCallRule:
7070
phpstan.rules.rule: %featureToggles.illegalConstructorMethodCall%
71-
PHPStan\Rules\Generics\PropertyVarianceRule:
72-
phpstan.rules.rule: %featureToggles.propertyVariance%
7371
PHPStan\Rules\Pure\PureFunctionRule:
7472
phpstan.rules.rule: %featureToggles.pure%
7573
PHPStan\Rules\Pure\PureMethodRule:
@@ -123,6 +121,8 @@ services:
123121
class: PHPStan\Rules\Generics\PropertyVarianceRule
124122
arguments:
125123
readOnlyByPhpDoc: %featureToggles.readOnlyByPhpDoc%
124+
tags:
125+
- phpstan.rules.rule
126126
-
127127
class: PHPStan\Rules\Pure\PureFunctionRule
128128

conf/config.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ parameters:
3434
alwaysCheckTooWideReturnTypeFinalMethods: false
3535
alwaysTrueAlwaysReported: false
3636
disableUnreachableBranchesRules: false
37-
propertyVariance: false
3837
stricterFunctionMap: false
3938
magicConstantOutOfContext: false
4039
pure: false

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ parametersSchema:
4040
alwaysCheckTooWideReturnTypeFinalMethods: bool()
4141
alwaysTrueAlwaysReported: bool()
4242
disableUnreachableBranchesRules: bool()
43-
propertyVariance: bool()
4443
stricterFunctionMap: bool()
4544
magicConstantOutOfContext: bool()
4645
pure: bool()

0 commit comments

Comments
 (0)