Learn-skills.dev php-saloon
Use this skill when building or debugging PHP API integrations and SDKs with Saloon, including connectors, requests, authentication, request bodies, testing, pagination, Laravel integration, and Saloon plugin workflows.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/aaronflorey/agent-skills/php-saloon" ~/.claude/skills/neversight-learn-skills-dev-php-saloon && rm -rf "$T"
manifest:
data/skills-md/aaronflorey/agent-skills/php-saloon/SKILL.mdsource content
php-saloon
Use this skill when you need to:
- build or refactor Saloon connectors, requests, or SDK-style clients
- add authentication, request bodies, retries, middleware, DTOs, pools, or pagination
- test Saloon integrations with
, fixtures, or Laravel helpersMockClient - work with Saloon plugins such as Laravel, caching, rate limiting, pagination, XML Wrangler, or Lawman
- upgrade Saloon between major versions, especially
tov3v4
Start Here
- Read
for install and first-request setup.references/getting-started.md - Read
for connectors, requests, auth, bodies, and sending flow.references/core-patterns.md - Read
for the most-usedreferences/api-reference.md
, failure-handling, and debugging APIs.Response - Read
for DTOs, middleware, OAuth2, pools, retries, solo requests, PSR hooks, and SDK patterns.references/advanced-patterns.md
Key Patterns
- Model each API integration with a
and each endpoint with aConnector
.Request - Put shared behavior like base URL, default headers, auth, retries, and middleware on the connector.
- For request bodies, add
and the matching trait likeHasBody
,HasJsonBody
,HasMultipartBody
,HasXmlBody
,HasFormBody
, orHasStringBody
.HasStreamBody - Use
helpers likeResponse
,json()
,dto()
,dtoOrFail()
,status()
,failed()
,throw()
, andgetPsrRequest()
.getPsrResponse() - Prefer Saloon's built-in testing tools over real API calls in tests.
Quick Examples
use Saloon\Http\Connector; class ForgeConnector extends Connector { public function resolveBaseUrl(): string { return 'https://forge.laravel.com/api/v1'; } }
use Saloon\Enums\Method; use Saloon\Http\Request; class GetServersRequest extends Request { protected Method $method = Method::GET; public function resolveEndpoint(): string { return '/servers'; } }
$response = $connector->send(new GetServersRequest); $servers = $response->json();
Reference Files
: installation, first connector, first request, sending basicsreferences/getting-started.md
: connectors, requests, auth, request bodies, and sending flowreferences/core-patterns.md
: response helpers, response customization, failure handling, and debug APIsreferences/api-reference.md
: SDKs, DTOs, middleware, OAuth2, pools, retries, solo requests, PSR hooksreferences/advanced-patterns.md
:references/testing-debugging.md
, fixtures, assertions, debug helpers, known testing pitfallsMockClient
: pagination, Laravel plugin, caching, rate limits, XML Wrangler, Lawman, plugin authoringreferences/integrations-plugins.md
: supported versions,references/upgrades.md
tov2
,v3
tov3
, and security-sensitive upgrade notesv4
Retrieval Notes
- Open
before writing new Saloon code from scratch.references/core-patterns.md - Open
when you need the exact response and error-handling helpers to call.references/api-reference.md - Open
before changing fixtures, mocks, or request inspection.references/testing-debugging.md - Open
before touching legacy Saloon code or serializer, endpoint, and fixture-path behavior.references/upgrades.md