Skip to content

Options Architecture Refactoring - Tracking Issue #1647

@iMacTia

Description

@iMacTia

Options Architecture Refactoring - Tracking Issue

This is the central tracking issue for the Options architecture refactoring work. This epic modernizes Faraday's Options system while maintaining 100% backward compatibility.

📋 Overview

Goal: Detach Options subclasses from Ruby Struct inheritance and introduce a cleaner OOP architecture with BaseOptions and OptionsLike.

Why: Reduce code duplication, improve maintainability, centralize correctness-sensitive logic (nested coercion, deep merging, deep duplication).

Safety: No breaking changes. All existing APIs preserved. This is safe for a minor version release.

📚 Documentation

🗺️ Release Plan

We will release incrementally across 4 minor versions:

  • v2.x.0: Foundation (OptionsLike, BaseOptions, Utils.deep_merge! update)
  • v2.x.1: Convert ProxyOptions, RequestOptions, SSLOptions
  • v2.x.2: Convert ConnectionOptions
  • v2.x.3: Convert Env + Documentation (most critical validation)

✅ Task Progress

Prerequisite

Phase 1: Foundation (v2.x.0)

Phase 2: Small Options (v2.x.1)

Phase 3: ConnectionOptions (v2.x.2)

Phase 4: Env + Docs (v2.x.3)

🔒 Backward Compatibility Guarantees

  1. Existing Faraday::Options class remains untouched
  2. All public APIs preserved (merge!, update, to_hash, etc.)
  3. Env explicitly preserves [] and []= for middleware compatibility
  4. No API removals - everything that works today will continue working

💬 Discussion

Use this issue for questions, progress updates, and coordination. Each sub-issue contains detailed implementation steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions