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 3030use PHPStan \Reflection \ReflectionProvider ;
3131use PHPStan \Reflection \ReflectionProviderStaticAccessor ;
3232use PHPStan \ShouldNotHappenException ;
33+ use PHPStan \Type \ObjectType ;
3334use function array_diff_key ;
3435use function array_intersect ;
3536use function array_key_exists ;
@@ -194,6 +195,7 @@ public static function postInitializeContainer(Container $container): void
194195
195196 ReflectionProviderStaticAccessor::registerInstance ($ container ->getByType (ReflectionProvider::class));
196197 PhpVersionStaticAccessor::registerInstance ($ container ->getByType (PhpVersion::class));
198+ ObjectType::resetCaches ();
197199 $ container ->getService ('typeSpecifier ' );
198200
199201 BleedingEdgeToggle::setBleedingEdge ($ container ->getParameter ('featureToggles ' )['bleedingEdge ' ]);
Original file line number Diff line number Diff line change 3131use PHPStan \Reflection \ReflectionProviderStaticAccessor ;
3232use PHPStan \Type \Constant \OversizedArrayBuilder ;
3333use PHPStan \Type \DirectTypeAliasResolverProvider ;
34+ use PHPStan \Type \ObjectType ;
3435use PHPStan \Type \OperatorTypeSpecifyingExtensionRegistry ;
3536use PHPStan \Type \Type ;
3637use PHPStan \Type \TypeAliasResolver ;
@@ -203,6 +204,7 @@ public function getRegistry(): OperatorTypeSpecifyingExtensionRegistry
203204 if ($ originalPhpVersion !== null ) {
204205 PhpVersionStaticAccessor::registerInstance ($ originalPhpVersion );
205206 }
207+ ObjectType::resetCaches ();
206208 }
207209 }
208210
Original file line number Diff line number Diff line change 9797use PHPStan \Rules \Properties \MissingPropertyTypehintRule ;
9898use PHPStan \Rules \Registry as RuleRegistry ;
9999use PHPStan \Type \FileTypeMapper ;
100+ use PHPStan \Type \ObjectType ;
100101use Throwable ;
101102use function array_fill_keys ;
102103use function count ;
@@ -174,6 +175,7 @@ static function (): void {
174175 } finally {
175176 ReflectionProviderStaticAccessor::registerInstance ($ originalReflectionProvider );
176177 PhpVersionStaticAccessor::registerInstance ($ originalPhpVersion );
178+ ObjectType::resetCaches ();
177179 }
178180
179181 return $ errors ;
Original file line number Diff line number Diff line change 22
33namespace PHPStan \Reflection ;
44
5- use PHPStan \Type \ObjectType ;
6-
75final class ReflectionProviderStaticAccessor
86{
97
@@ -16,7 +14,6 @@ private function __construct()
1614 public static function registerInstance (ReflectionProvider $ reflectionProvider ): void
1715 {
1816 self ::$ instance = $ reflectionProvider ;
19- ObjectType::resetCaches ();
2017 }
2118
2219 public static function getInstance (): ReflectionProvider
You can’t perform that action at this time.
0 commit comments