protected function loadFile(string $file, array $options)
    {
        if (isset($options['num']) || isset($options['callbacks'])) {
            throw new BadMethodCallException("Options 'num' and 'callbacks' aren't supported with the Symfony"
                ." YAML parser. Please install the yaml PHP extension.");
        }

        try {
            return $this->parser->parseFile($file, Yaml::PARSE_OBJECT_FOR_MAP);
        } catch (ParseException $parseException) {
            $err = $parseException->getMessage();
            throw new LoadException("Failed to load settings from '$file': {$err}", 0, $parseException);
        }
    }
protected function loadFile(string $file, array $options)
    {
        if (isset($options['num']) || isset($options['callbacks'])) {
            throw new BadMethodCallException("Options 'num' and 'callbacks' aren't supported with the Symfony"
                ." YAML parser. Please install the yaml PHP extension.");
        }

        try {
            return $this->parser->parseFile($file, Yaml::PARSE_OBJECT_FOR_MAP);
        } catch (ParseException $parseException) {
            $err = $parseException->getMessage();
            throw new LoadException("Failed to load settings from '$file': {$err}", 0, $parseException);
        }
    }
protected function loadFile ( string $ file , array $ options ) { if ( isset ( $ options [ 'num' ] ) || isset ( $ options [ 'callbacks' ] ) ) { throw new BadMethodCallException ( "Options 'num' and 'callbacks' aren't supported with the Symfony" . " YAML parser. Please install the yaml PHP extension." ) ; } try { return $ this -> parser -> parseFile ( $ file , Yaml :: PARSE_OBJECT_FOR_MAP ) ; } catch ( ParseException $ parseException ) { $ err = $ parseException -> getMessage ( ) ; throw new LoadException ( "Failed to load settings from '$file': {$err}" , 0 , $ parseException ) ; } }
Parse a yaml file

@param string $file
@param array  $options
@return \stdClass|mixed
Parse a yaml file