File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 30
30
use PHPStan \Reflection \ReflectionProvider ;
31
31
use PHPStan \Reflection \ReflectionProviderStaticAccessor ;
32
32
use PHPStan \ShouldNotHappenException ;
33
+ use PHPStan \Type \ObjectType ;
33
34
use function array_diff_key ;
34
35
use function array_intersect ;
35
36
use function array_key_exists ;
@@ -194,6 +195,7 @@ public static function postInitializeContainer(Container $container): void
194
195
195
196
ReflectionProviderStaticAccessor::registerInstance ($ container ->getByType (ReflectionProvider::class));
196
197
PhpVersionStaticAccessor::registerInstance ($ container ->getByType (PhpVersion::class));
198
+ ObjectType::resetCaches ();
197
199
$ container ->getService ('typeSpecifier ' );
198
200
199
201
BleedingEdgeToggle::setBleedingEdge ($ container ->getParameter ('featureToggles ' )['bleedingEdge ' ]);
Original file line number Diff line number Diff line change 31
31
use PHPStan \Reflection \ReflectionProviderStaticAccessor ;
32
32
use PHPStan \Type \Constant \OversizedArrayBuilder ;
33
33
use PHPStan \Type \DirectTypeAliasResolverProvider ;
34
+ use PHPStan \Type \ObjectType ;
34
35
use PHPStan \Type \OperatorTypeSpecifyingExtensionRegistry ;
35
36
use PHPStan \Type \Type ;
36
37
use PHPStan \Type \TypeAliasResolver ;
@@ -203,6 +204,7 @@ public function getRegistry(): OperatorTypeSpecifyingExtensionRegistry
203
204
if ($ originalPhpVersion !== null ) {
204
205
PhpVersionStaticAccessor::registerInstance ($ originalPhpVersion );
205
206
}
207
+ ObjectType::resetCaches ();
206
208
}
207
209
}
208
210
Original file line number Diff line number Diff line change 97
97
use PHPStan \Rules \Properties \MissingPropertyTypehintRule ;
98
98
use PHPStan \Rules \Registry as RuleRegistry ;
99
99
use PHPStan \Type \FileTypeMapper ;
100
+ use PHPStan \Type \ObjectType ;
100
101
use Throwable ;
101
102
use function array_fill_keys ;
102
103
use function count ;
@@ -174,6 +175,7 @@ static function (): void {
174
175
} finally {
175
176
ReflectionProviderStaticAccessor::registerInstance ($ originalReflectionProvider );
176
177
PhpVersionStaticAccessor::registerInstance ($ originalPhpVersion );
178
+ ObjectType::resetCaches ();
177
179
}
178
180
179
181
return $ errors ;
Original file line number Diff line number Diff line change 2
2
3
3
namespace PHPStan \Reflection ;
4
4
5
- use PHPStan \Type \ObjectType ;
6
-
7
5
final class ReflectionProviderStaticAccessor
8
6
{
9
7
@@ -16,7 +14,6 @@ private function __construct()
16
14
public static function registerInstance (ReflectionProvider $ reflectionProvider ): void
17
15
{
18
16
self ::$ instance = $ reflectionProvider ;
19
- ObjectType::resetCaches ();
20
17
}
21
18
22
19
public static function getInstance (): ReflectionProvider
You can’t perform that action at this time.
0 commit comments