use Symfony\Component\VarExporter\ProxyHelper;
/**
* Resolves named arguments to their corresponding numeric index.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class ResolveNamedArgumentsPass extends AbstractRecursivePass
{ protected function processValue(mixed
$value, bool
$isRoot = false
): mixed
{ if ($value instanceof AbstractArgument &&
$value->
getText().'.' ===
$value->
getTextWithContext()) { $value->
setContext(sprintf('A value found in service "%s"',
$this->currentId
));
} if (!
$value instanceof Definition
) { return parent::
processValue($value,
$isRoot);
} $calls =
$value->
getMethodCalls();
$calls[] =
['__construct',
$value->
getArguments()];
foreach ($calls as $i =>
$call) { [