Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implements third-party HTTP API SDKs with SaloonPHP, covering connectors, resources, DTOs, requests, and fixture-driven Pest tests.
50% 92%+42 ptsof test cases passed
Passed 22 of 24 test cases with the skill, and 12 of 24 without it.
3 of 3 safety checks passed
Use this skill when working inside a SaloonPHP-based SDK in this repo's
shape — single Connector extending Saloon's Connector, organized by
Resources/ + Requests/ + Data/ + Enums/ + Exceptions/, with
recorded Saloon fixtures driving Pest tests at 100% coverage.
For general Pest / factory conventions that aren't Saloon-specific (no
it(), factories under tests/Factories/, exception-test styles), see
the pest-package-tests skill — this skill assumes those and only
covers the Saloon side.
A minimal slice (one resource, one request, one DTO, one fixture-backed test):
// src/Data/Widget.php
final readonly class Widget implements JsonSerializable {
public function __construct(public string $id, public string $name) {}
public static function from(array $data): self { /* hydration + validation */ }
public function jsonSerialize(): array { /* snake_case */ }
}
// src/Requests/GetWidget.php
final class GetWidget extends Request {
protected Method $method = Method::GET;
public function __construct(private readonly int|string $id) {}
#[Override] public function resolveEndpoint(): string {
return sprintf('/widgets/%s', $this->id);
}
}
// src/Resources/WidgetResource.php
final class WidgetResource extends BaseResource {
public function get(): Widget {
$data = $this->connector->send(new GetWidget($this->id))->json('data');
return Widget::from($data);
}
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.