Skip to content

Decompose Utils into focused APIs and internal services #3886

Description

@GrahamCampbell

Guzzle 8 has already removed several unrelated Utils methods and moved no-proxy handling to ProxyOptions. We will finish separating the remaining responsibilities after 8.0.

  • Replace Utils::chooseHandler() with HandlerFactory::createDefault().
  • Replace Utils::headersFromLines() and Utils::normalizeHeaderKeys() with Headers::fromLines() and Headers::normalizeKeys().
  • Replace Utils::debugResource() with DebugResource::from().
  • Replace Utils::normalizeProtocols() with Protocols::normalize().
  • Move Utils::defaultUserAgent() to Client::defaultUserAgent().

The public replacements will land in 8.1. The old public methods will become exact PHPDoc-deprecated delegates, without runtime warnings, and will be removed in 9.0. Handler selection, exceptions, and diagnostics behavior will remain unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions