public static function safeParse($input, $validateDuplicateKeys = true)
    {
        if (method_exists('Symfony\Component\Yaml\Yaml', 'setPhpParsing')) {
            Yaml::setPhpParsing(false);
        }

        if ($validateDuplicateKeys) {
            self::validateDuplicatedKey($input);
        }

        return (new Parser())->parse($input, true, false);
    }