44
55use PhpParser \Node ;
66use PHPStan \Analyser \Fiber \FiberScope ;
7+ use PHPStan \DependencyInjection \Container ;
78use PHPStan \DependencyInjection \Type \DynamicReturnTypeExtensionRegistryProvider ;
89use PHPStan \DependencyInjection \Type \ExpressionTypeResolverExtensionRegistryProvider ;
910use PHPStan \Node \Printer \ExprPrinter ;
@@ -24,6 +25,7 @@ final class DirectInternalScopeFactory implements InternalScopeFactory
2425 * @param callable(Node $node, Scope $scope): void|null $nodeCallback
2526 */
2627 public function __construct (
28+ private Container $ container ,
2729 private ReflectionProvider $ reflectionProvider ,
2830 private InitializerExprTypeResolver $ initializerExprTypeResolver ,
2931 private DynamicReturnTypeExtensionRegistryProvider $ dynamicReturnTypeExtensionRegistryProvider ,
@@ -69,6 +71,7 @@ public function create(
6971 }
7072
7173 return new $ className (
74+ $ this ->container ,
7275 $ this ,
7376 $ this ->reflectionProvider ,
7477 $ this ->initializerExprTypeResolver ,
@@ -107,6 +110,7 @@ public function create(
107110 public function toFiberFactory (): InternalScopeFactory
108111 {
109112 return new self (
113+ $ this ->container ,
110114 $ this ->reflectionProvider ,
111115 $ this ->initializerExprTypeResolver ,
112116 $ this ->dynamicReturnTypeExtensionRegistryProvider ,
@@ -129,6 +133,7 @@ public function toFiberFactory(): InternalScopeFactory
129133 public function toMutatingFactory (): InternalScopeFactory
130134 {
131135 return new self (
136+ $ this ->container ,
132137 $ this ->reflectionProvider ,
133138 $ this ->initializerExprTypeResolver ,
134139 $ this ->dynamicReturnTypeExtensionRegistryProvider ,
0 commit comments