trigger_deprecation('symfony/yaml', '6.2', 'YAML syntax for key "%s" is deprecated and replaced by "!php/const %s".',
$values['key'
],
substr($values['key'
], 11
));
} if ($context && 'sequence' ==
$context) { throw new ParseException('You cannot define a mapping item when in a sequence.',
$this->currentLineNb + 1,
$this->currentLine,
$this->filename
);
} $context = 'mapping';
try { $key = Inline::
parseScalar($values['key'
]);
} catch (ParseException
$e) { $e->
setParsedLine($this->
getRealCurrentLineNb() + 1
);
$e->
setSnippet($this->currentLine
);
throw $e;
} if (!\
is_string($key) && !\
is_int($key)) { throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string'
).' keys are not supported. Quote your evaluable mapping keys instead.',
$this->
getRealCurrentLineNb() + 1,
$this->currentLine
);
} // Convert float keys to strings, to avoid being converted to integers by PHP
if (\
is_float($key)) {