protected function loadFile(string $file, array $options)
    {
        $yaml = file_get_contents($file);

        // Workaround for the bad practise of PHP extensions to trigger a warning and return false.
        error_clear_last();

        $unused = null;

        $data = @yaml_parse(
            $yaml,
            $options['pos'] ?? 0,
            $unused,
            $options['callbacks'] ?? []
        );

        return $data;
    }