Skip to content

Commit 63d0026

Browse files
committed
Classes that were previously @final were made final
1 parent 5651bec commit 63d0026

File tree

103 files changed

+102
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+102
-205
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ As a replacement you can implement [`PHPStan\Type\ExpressionTypeResolverExtensio
216216

217217
### Minor backward compatibility breaks
218218

219+
* Classes that were previously `@final` were made `final`
219220
* 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
220221
* Parameter `StatementContext $context` of [`NodeScopeResolver::processStmtNodes()`](https://apiref.phpstan.org/2.0.x/PHPStan.Analyser.NodeScopeResolver.html#_processStmtNodes) made required
221222
* ClassPropertiesNode - remove `$extensions` parameter from [`getUninitializedProperties()`](https://apiref.phpstan.org/2.0.x/PHPStan.Node.ClassPropertiesNode.html#_getUninitializedProperties)

src/Analyser/Error.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
/**
1616
* @api
17-
* @final
1817
*/
19-
class Error implements JsonSerializable
18+
final class Error implements JsonSerializable
2019
{
2120

2221
public const PATTERN_IDENTIFIER = '[a-zA-Z0-9](?:[a-zA-Z0-9\\.]*[a-zA-Z0-9])?';

src/Analyser/ImpurePoint.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
/**
99
* @phpstan-type ImpurePointIdentifier = 'echo'|'die'|'exit'|'propertyAssign'|'propertyAssignByRef'|'propertyUnset'|'methodCall'|'new'|'functionCall'|'include'|'require'|'print'|'eval'|'superglobal'|'yield'|'yieldFrom'|'static'|'global'|'betweenPhpTags'
1010
* @api
11-
* @final
1211
*/
13-
class ImpurePoint
12+
final class ImpurePoint
1413
{
1514

1615
/**

src/Analyser/InternalError.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
/**
1212
* @api
13-
* @final
1413
* @phpstan-type Trace = list<array{file: string|null, line: int|null}>
1514
*/
16-
class InternalError implements JsonSerializable
15+
final class InternalError implements JsonSerializable
1716
{
1817

1918
public const STACK_TRACE_METADATA_KEY = 'stackTrace';

src/Analyser/NameScope.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818

1919
/**
2020
* @api
21-
* @final
2221
*/
23-
class NameScope
22+
final class NameScope
2423
{
2524

2625
private TemplateTypeMap $templateTypeMap;

src/Analyser/ScopeFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
/**
66
* @api
7-
* @final
87
*/
9-
class ScopeFactory
8+
final class ScopeFactory
109
{
1110

1211
public function __construct(private InternalScopeFactory $internalScopeFactory)

src/Analyser/StatementExitPoint.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
/**
88
* @api
9-
* @final
109
*/
11-
class StatementExitPoint
10+
final class StatementExitPoint
1211
{
1312

1413
public function __construct(private Stmt $statement, private MutatingScope $scope)

src/Analyser/StatementResult.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88
/**
99
* @api
10-
* @final
1110
*/
12-
class StatementResult
11+
final class StatementResult
1312
{
1413

1514
/**

src/Analyser/ThrowPoint.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
/**
1212
* @api
13-
* @final
1413
*/
15-
class ThrowPoint
14+
final class ThrowPoint
1615
{
1716

1817
/**

src/Analyser/TypeSpecifierContext.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
/**
88
* @api
9-
* @final
109
*/
11-
class TypeSpecifierContext
10+
final class TypeSpecifierContext
1211
{
1312

1413
public const CONTEXT_TRUE = 0b0001;

0 commit comments

Comments
 (0)