WordPress / WordPress/php-ai-client

Improve documentation for HTTPlug HTTP client requirement

Open
#82 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
308
Forks
84
Avg merge
7d 21h
Merged PRs (30d)
2

Description

Background

The WordPress PHP AI Client correctly uses HTTPlug for HTTP client abstraction and auto-discovery. However, new users aren't aware they need to install an HTTPlug-compatible HTTP client adapter.

Current Experience

  1. User installs: composer require wordpress/php-ai-client
  2. User runs code and gets: DiscoveryFailedException: Could not find resource...
  3. User must research HTTPlug and PSR-18 to understand the solution

Proposed Documentation Improvements

Add to README.md:

HTTP Client Requirement

This package uses HTTPlug for HTTP client abstraction. You need to install a compatible HTTP client adapter:

# Choose one HTTP client adapter:
composer require php-http/guzzle7-adapter     # Guzzle 7 (recommended)
composer require php-http/curl-client         # cURL
composer require symfony/http-client          # Symfony

Add composer.json suggestions:

"suggest": {
  "php-http/guzzle7-adapter": "HTTPlug adapter for Guzzle 7 (recommended)",
  "php-http/curl-client": "HTTPlug adapter for cURL"
}

This maintains the correct HTTPlug architecture while improving the developer experience.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review README.md and composer.json first, focusing on the installation guidance and existing dependency suggestions. Confirm the documented HTTPlug-compatible adapters and package names, then verify that the README explains the requirement and composer.json communicates the optional dependencies clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.