juststeveking/sdk-tools
Tools for building SDKs in Laravel and PHP. juststeveking/sdk-tools provides utilities and conventions to scaffold, structure, and maintain API client packages, cutting boilerplate so you can ship clean, consistent SDKs faster.
Architecture fit: The first thing a TPM must correct in the intake ticket is the framing: this is not a Laravel package. It is a framework-agnostic set of SDK-authoring primitives — abstract Sdk class, Resource classes, connector/transporter abstraction, and response caching — with no service provider, no auto-discovery, no facade, no publishable config. That narrows its legitimate home to two places: inside a dedicated PHP SDK repository, or inside an internal service-client layer wrapping a third-party API. Any proposal to drop it into business-domain code, controllers, or jobs should be rejected at intake. The practical consequence is sponsor clarity: the owning team is whichever team ships (or plans to ship) PHP client libraries, and the success metric is SDK ship velocity, not application throughput. If no such initiative is on the roadmap with a named owner and target date, this is a reading exercise, not a program.
Integration feasibility: Composer install is trivial; the surrounding work is not. Because the package deliberately ships no transport, every adopting team must select and bind a PSR-18 client (Guzzle or symfony/http-client), construct the SDK wrapper, and register it in a service provider themselves. Critically for Laravel teams, there is no Http::fake() interception — testing means injecting a mock PSR-18 client, which is a skill the team must acquire rather than a pattern it already has. Budget rollout accordingly: the savings are real but concentrated in HTTP/endpoint plumbing, not in onboarding. Plan one reference implementation, then treat subsequent SDKs as cheap follow-ons — do not assume the first one is cheap.
Technical risk: High, and driven almost entirely by maturity and bus factor rather than code quality. The codebase is small and MIT-licensed, so exit risk is genuinely low — a fork is an afternoon, not a project. Ownership risk, however, transfers to us in full the moment it lands in a composer.json. Secondary program risks worth naming in the ADR: dependency constraints frozen at a July 2023 release could block an unrelated PHP or Laravel upgrade; ambiguous error semantics (throw vs. return on 4xx/5xx) could leak into a public SDK contract and become very expensive to change later; and unclear PSR-18 conformance would force a fork rather than a thin wrapper. Zero dependents means zero production validation — treat every claim about the patterns "working at scale" as unproven.
Key questions:
Stack fit: Frame it as a dev-time scaffold or a vendored dependency for SDK repositories and internal client packages. It is a poor fit as a runtime dependency in customer-facing Laravel services. The architectural constraint that matters to a TPM is the boundary: the package lives behind an internal SdkClient/Transporter adapter so its abstractions never appear in public SDK contracts or leak into application code. Enforce composition over subclassing in code review — teams that extend the base classes rather than compose them quietly convert a swappable dependency into a permanent one.
Migraition path: Do not adopt in place. Fund a time-boxed spike — days, not sprints — on one non-critical SDK surface: a single resource, two or three endpoints, wrapped behind the adapter, with a fake PSR-18 client bound in tests. The deliverable is a credible sizing number for the real build plus a build-vs-buy recommendation, not a merge to main. This produces an artifact a review board can act on instead of a speculative estimate, and it costs almost nothing to run.
Compatibility: Treat the pre-adoption audit as a gating checklist with a named owner per item. Read composer.json constraints and transitive dependencies; verify autoloading; confirm the exception model; check whether request/response classes are final (composition forced) or open (subclassing invites lock-in); and confirm default Accept/Content-Type headers, since small SDK helpers frequently omit them and produce 406/415s against real APIs. Test against our actual PHP baseline, not the package's stated minimum. Each unchecked box is schedule risk carried into the adoption milestone — resolve them in the spike, not after commitment.
Sequencing:
src/; the codebase is small enough to fully assess.Maintenance: Adoption transfers ownership to us in full. PHP upgrades, dependency bumps, transitive security patches, and behavioral fixes all become backlog items in the owning team's roadmap the moment the ADR is approved — not a TBD. Budget a named maintainer and an annual review, and pin to a commit hash rather than a version range so silent upstream drift cannot reach production. The cheaper alternative, which should be explicitly considered, is vendoring the useful parts into our namespace and dropping the dependency entirely.
Support: Community-only, and the community is one person with no releases since July 2023. There is no SLA, no triage, no maintainer backstop; debugging is source reading plus whatever internal documentation we write. That is acceptable for an internal tool or a spike and unacceptable on a customer-facing critical path without a documented escalation path. If the SDK is customer-facing and long-lived, support cost is the deciding factor — not the scaffolding time saved.
Scaling: Not a runtime concern; this is a thin HTTP abstraction over a PSR-18 client that scales with whatever transport you inject. The scaling question is organizational. The headline benefit — consistent SDK conventions across teams — only materializes if we codify those conventions internally and enforce them in review. With zero downstream dependents, there is no external evidence the patterns hold beyond the author's own usage, so do not present cross-team consistency as a benefit in a stakeholder deck without a concrete internal standard already written.
Failure modes:
Ramp-up: Low for PHP developers comfortable with PSR-18 and light dependency injection; the API surface is small and the concepts are familiar to anyone who has used Saloon or Guzzle. The real ramp-up cost is documentation: there is effectively none, so the source is the onboarding material and the team inherits the job of writing the guide. Plan a short, time-boxed spike with a working prototype as the exit criterion, not a sprint of exploration. From a program standpoint the shape is simple and should be stated that way to stakeholders: one spike, one named owner, one ADR, one decision — then either fork-and-own or extract the patterns and move on. Low cost to evaluate, real cost to own; the recommendation is to evaluate deliberately, not to adopt by default.
How can I help you explore Laravel packages today?