Skip to content

Commit aefd71c

Browse files
committed
[BCB] ClassPropertiesNode - remove $extensions parameter from getUninitializedProperties()
1 parent 939a715 commit aefd71c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

UPGRADING.md

+1
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ This method now longer accepts `Expr $rootExpr`. If you want to change it, call
5252

5353
* Parameter `$callableParameters` of [`MutatingScope::enterAnonymousFunction()`](https://apiref.phpstan.org/2.0.x/PHPStan.Analyser.MutatingScope.html#_enterAnonymousFunction) and [`enterArrowFunction()`](https://apiref.phpstan.org/2.0.x/PHPStan.Analyser.MutatingScope.html#_enterArrowFunction) made required
5454
* Parameter `StatementContext $context` of [`NodeScopeResolver::processStmtNodes()`](https://apiref.phpstan.org/2.0.x/PHPStan.Analyser.NodeScopeResolver.html#_processStmtNodes) made required
55+
* ClassPropertiesNode - remove `$extensions` parameter from [`getUninitializedProperties()`](https://apiref.phpstan.org/2.0.x/PHPStan.Node.ClassPropertiesNode.html#_getUninitializedProperties)

src/Node/ClassPropertiesNode.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use PHPStan\Node\Property\PropertyWrite;
1919
use PHPStan\Reflection\ClassReflection;
2020
use PHPStan\Reflection\MethodReflection;
21-
use PHPStan\Rules\Properties\ReadWritePropertiesExtension;
2221
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
2322
use PHPStan\TrinaryLogic;
2423
use PHPStan\Type\NeverType;
@@ -98,13 +97,11 @@ public function getClassReflection(): ClassReflection
9897

9998
/**
10099
* @param string[] $constructors
101-
* @param ReadWritePropertiesExtension[]|null $extensions
102100
* @return array{array<string, ClassPropertyNode>, array<array{string, int, ClassPropertyNode, string, string}>, array<array{string, int, ClassPropertyNode}>}
103101
*/
104102
public function getUninitializedProperties(
105103
Scope $scope,
106104
array $constructors,
107-
?array $extensions = null,
108105
): array
109106
{
110107
if (!$this->getClass() instanceof Class_) {
@@ -116,9 +113,7 @@ public function getUninitializedProperties(
116113
$originalProperties = [];
117114
$initialInitializedProperties = [];
118115
$initializedProperties = [];
119-
if ($extensions === null) {
120-
$extensions = $this->readWritePropertiesExtensionProvider->getExtensions();
121-
}
116+
$extensions = $this->readWritePropertiesExtensionProvider->getExtensions();
122117
$initializedViaExtension = [];
123118
foreach ($this->getProperties() as $property) {
124119
if ($property->isStatic()) {

0 commit comments

Comments
 (0)