@@ -814,7 +814,7 @@ private function addServiceConfigurator(Definition $definition, string $variable
814814
815815 if (\is_array ($ callable )) {
816816 if ($ callable [0 ] instanceof Reference
817- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
817+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
818818 ) {
819819 return \sprintf (" %s->%s( \$%s); \n" , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ variableName );
820820 }
@@ -1205,15 +1205,15 @@ private function addNewInstance(Definition $definition, string $return = '', ?st
12051205
12061206 if (['... ' ] === $ arguments && ('Closure ' !== ($ class = $ definition ->getClass () ?: 'Closure ' ) || $ definition ->isLazy () && (
12071207 $ callable [0 ] instanceof Reference
1208- || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->contains ($ callable [0 ]))
1208+ || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->offsetExists ($ callable [0 ]))
12091209 ))) {
12101210 $ initializer = 'fn () => ' .$ this ->dumpValue ($ callable [0 ]);
12111211
12121212 return $ return .LazyClosure::getCode ($ initializer , $ callable , $ class , $ this ->container , $ id ).$ tail ;
12131213 }
12141214
12151215 if ($ callable [0 ] instanceof Reference
1216- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
1216+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
12171217 ) {
12181218 return $ return .\sprintf ('%s->%s(%s) ' , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ arguments ? implode (', ' , $ arguments ) : '' ).$ tail ;
12191219 }
@@ -1920,7 +1920,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
19201920 if ($ value ->hasErrors () && $ e = $ value ->getErrors ()) {
19211921 return \sprintf ('throw new RuntimeException(%s) ' , $ this ->export (reset ($ e )));
19221922 }
1923- if ($ this ->definitionVariables ?->contains ($ value )) {
1923+ if ($ this ->definitionVariables ?->offsetExists ($ value )) {
19241924 return $ this ->dumpValue ($ this ->definitionVariables [$ value ], $ interpolate );
19251925 }
19261926 if ($ value ->getMethodCalls ()) {
0 commit comments