Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrates a third-party HTTP API into a Laravel app via SaloonPHP using a ports-and-adapters layout with fixture recording.
Use this skill ↓41% 77%+36 ptsof test cases passed
Passed 17 of 22 test cases with the skill, and 9 of 22 without it.
We need a lightweight fake implementation of our ExchangeRateService interface for fast unit tests and local development in Laravel without hitting external APIs. Where should this class be located and how should it be named?
Names the fake implementation class with the InMemory prefix.
3 of 3 safety checks passed
Use this skill when integrating a third-party API into a Laravel app (in-app code, no separate composer package) with SaloonPHP, behind a domain Contract.
This skill layers on saloon-integration. That skill owns the
Saloon mechanics — connector, resources, requests, output/input DTOs,
fixture redaction, the recording workflow. Read it first; this skill
only adds the Laravel concerns: the ports-and-adapters boundary,
container wiring, multi-tenant credentials, resilience, the write/push
side, and the HITL recording ritual. For non-Saloon Pest conventions,
see pest-package-tests.
Assumes saloonphp/laravel-plugin is installed. If you can't add it,
fall back to the plugin-free MockClient patterns in saloon-integration.
app/Http/Integrations/FinnHub/ # ADAPTER (Saloon, vendor vocabulary)
FinnHubConnector.php FinnHubConnectorFactory.php
Data/ Requests/ Resources/ Enums/ Exceptions/
app/Contracts/ # PORT + implementations (flat)
SymbolQuoteService.php # the interface
FinnHubSymbolQuoteService.php # Saloon-backed adapter-impl
InMemorySymbolQuoteService.php # test/dev default
app/Data/ # DOMAIN Data (provider-agnostic)
SymbolQuote.php
The one rule that governs everything: dependency points
adapter → domain, never the reverse. Nothing in app/Contracts/ or
app/Data/ may import anything under app/Http/Integrations/. The
domain must not know a provider exists. Consumers (controllers, actions,
jobs, webhook handlers) depend on the Contract, never the connector.
Fixtures are recorded from the live API, never hand-crafted (one
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.