Skip to content

Commit

Permalink
ObjectType static cache should be reset after container creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 6, 2023
1 parent 631e1d2 commit b13ce59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DependencyInjection/ContainerFactory.php
Expand Up @@ -22,6 +22,7 @@
use PHPStan\Reflection\ReflectionProviderStaticAccessor;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Generic\TemplateTypeVariance;
use PHPStan\Type\ObjectType;
use Symfony\Component\Finder\Finder;
use function array_diff_key;
use function array_map;
Expand Down Expand Up @@ -171,6 +172,7 @@ public static function postInitializeContainer(Container $container): void
$broker = $container->getByType(Broker::class);
Broker::registerInstance($broker);
ReflectionProviderStaticAccessor::registerInstance($container->getByType(ReflectionProvider::class));
ObjectType::resetCaches();
$container->getService('typeSpecifier');

BleedingEdgeToggle::setBleedingEdge($container->getParameter('featureToggles')['bleedingEdge']);
Expand Down

0 comments on commit b13ce59

Please sign in to comment.