sammyjo20/saloon
Saloon is a Laravel/PHP package for building elegant, robust API integrations. It provides an object-oriented, class-based way to define requests and responses, with built-in support for authentication, caching, retries, rate limiting, and testing.
Architecture fit
Saloon is a class-based HTTP client abstraction for Laravel/PHP (Guzzle-backed, PSR-18 compatible) that wraps third-party APIs into testable Connector/Request/Response objects. It sits in the service-integration layer of a typical Laravel application, replacing ad-hoc Http:: calls with encapsulated, mockable classes. v4.5.0 adds a HasApiVersion trait for API versioning — an additive, opt-in capability that formalises something teams currently handle by hand (version strings embedded in base URLs, paths, headers, or query params). Architecturally this is a good fit: it lets version be declared as connector/request configuration rather than scattered through request-building logic, which improves consistency and makes version pinning auditable.
Integration feasibility
Low effort. This is a semver-minor release within the v4 line, so existing consumers can bump the constraint (e.g. ^4.4 → ^4.5) and take it with no code changes. The trait is opt-in and does not alter existing Connector or Request behaviour. The main integration work is not adoption of the dependency but adoption of a convention — deciding where and how version is expressed per upstream API.
Technical risk
Low-to-moderate, and almost entirely organisational rather than technical:
Key questions
HasApiVersion support version placement in path vs. header vs. query, or is one style assumed?Stack fit
Fits standard Laravel projects using Saloon for outbound integrations. No new runtime dependency, no service, no infrastructure change — it is a library-level concern contained within application code.
Migration path
^4.5, run the test suite, ship. No source changes required.Compatibility
Additive and backward compatible. Existing connectors, request classes, mocking/recording, and PSR-18/Guzzle interop are unaffected. The only compatibility question is forward-looking: pin the constraint to ^4.5 (not >=4.5) so a future v5 trait redesign surfaces as an explicit upgrade decision rather than a surprise.
Sequencing
Maintenance
Low. The dependency is widely used and actively maintained; the release cadence is steady but the v4 line appears stable. Ongoing cost is governance, not code: the version constants introduced via the trait become configuration that must be reviewed as upstream APIs evolve. Assign clear ownership so version bumps don't rot.
Support
Minimal. Developers already comfortable with Saloon need only a short brief on the trait and the team convention. The support burden shifts slightly toward "why is this connector calling v2 when v3 exists?" — a process question answerable with the convention document, not a code problem.
Scaling
Negligible runtime cost — this is configuration, not a hot path. It scales well organisationally: as the number of versioned integrations grows, declarative version handling is more auditable than scattered string literals. It does not, by itself, solve multi-version coexistence (calling v2 and v3 of the same API simultaneously), which should be verified as a supported pattern before relying on it.
Failure modes
Ramp-up
Roughly half a day for a developer already fluent in Saloon to adopt the trait on one connector. One to two days of team time to agree the convention, document it, and add the accompanying tests and review checklist. No prior Saloon experience means a longer ramp on the library itself (Connector/Request/Response modelling, mocking, auth), which is unchanged by this release.
How can I help you explore Laravel packages today?