-
Notifications
You must be signed in to change notification settings - Fork 40
Open
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
- User installs: composer require wordpress/php-ai-client
- User runs code and gets: DiscoveryFailedException: Could not find resource...
- 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 # SymfonyAdd 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.
Metadata
Metadata
Assignees
Labels
No labels