Skip to content

Commit 4e7d60d

Browse files
committed
Deprecated PHPStan\Broker\Broker::getInstance(). Use PHPStan\Reflection\ReflectionProviderStaticAccessor instead.
1 parent c775594 commit 4e7d60d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

phpstan-baseline.neon

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ parameters:
9090
count: 1
9191
path: src/PhpDoc/ResolvedPhpDocBlock.php
9292

93+
-
94+
message:
95+
"""
96+
#^Call to deprecated method getInstance\\(\\) of class PHPStan\\\\Broker\\\\Broker\\:
97+
Use PHPStan\\\\Reflection\\\\ReflectionProviderStaticAccessor instead$#
98+
"""
99+
count: 1
100+
path: src/PhpDoc/StubValidator.php
101+
93102
-
94103
message: "#^Return type \\(PHPStan\\\\PhpDoc\\\\Tag\\\\ParamTag\\) of method PHPStan\\\\PhpDoc\\\\Tag\\\\ParamTag\\:\\:withType\\(\\) should be covariant with return type \\(static\\(PHPStan\\\\PhpDoc\\\\Tag\\\\TypedTag\\)\\) of method PHPStan\\\\PhpDoc\\\\Tag\\\\TypedTag\\:\\:withType\\(\\)$#"
95104
count: 1
@@ -245,6 +254,15 @@ parameters:
245254
count: 1
246255
path: src/Testing/PHPStanTestCase.php
247256

257+
-
258+
message:
259+
"""
260+
#^Call to deprecated method getInstance\\(\\) of class PHPStan\\\\Broker\\\\Broker\\:
261+
Use PHPStan\\\\Reflection\\\\ReflectionProviderStaticAccessor instead$#
262+
"""
263+
count: 1
264+
path: src/Type/ObjectType.php
265+
248266
-
249267
message:
250268
"""

src/Broker/Broker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public static function registerInstance(Broker $broker): void
3737
self::$instance = $broker;
3838
}
3939

40+
/**
41+
* @deprecated Use PHPStan\Reflection\ReflectionProviderStaticAccessor instead
42+
*/
4043
public static function getInstance(): Broker
4144
{
4245
if (self::$instance === null) {

0 commit comments

Comments
 (0)