ptondereau/laravel-ups-api
Laravel package that wraps the UPS API, letting you easily add shipping rates, tracking, address validation, and label creation to your Laravel applications through a clean, configurable integration.
Architecture fit
ptondereau/Laravel-UPS-Api is a thin, conventional Laravel integration package: a service provider with auto-discovery, a publishable config file for UPS credentials, and facades fronting discrete service classes (Ups\Rate, Ups\Shipping, Ups\Tracking, Ups\Address, etc.) that speak to UPS's REST endpoints over OAuth client-credentials. It imposes no domain architecture — it is an infrastructure adapter you call from a service or job. That makes it a low-coupling fit for a Laravel monolith, a modular monolith, or a standalone shipping service. v5.0.0 does not add business capability; it is a platform-currency release that re-baselines the supported framework/runtime matrix and hardens the type contracts.
Integration feasibility
composer require ptondereau/laravel-ups-api:^5.0 is mechanically trivial; feasibility is entirely gated by the host application's PHP and Laravel version. Laravel 13 and PHP 8.5 are the leading edge of the matrix, so for the majority of estates this release is not yet installable — and conversely, teams already running L13/PHP 8.5 previously had no supported path at all. The @mixin annotations on facades are a genuine integration accelerant: facade calls previously resolved to mixed under PHPStan and PhpStorm, which forced developers to read package source to learn return types and pushed teams toward blanket baselines or @phpstan-ignore. That friction is now removed.
Technical risk
composer.json minimums; that is the single highest-impact unknown and must be confirmed before planning.@mixin correctness is asserted, not proven. If a facade method is not actually present on the mapped Ups\* root class, static analysis will report confident-but-wrong types. It also converts previously-suppressed mixed flows into real type errors, which can surface as a wave of new PHPStan/PhpStorm diagnostics in consuming apps.Key questions
Stack fit
Treat v5.0.0 as a forward-looking adoption, not a maintenance upgrade. Estates on Laravel 10–12 with PHP 8.2–8.4 should remain on 4.1.x — this release is a no-op for them and forcing it will simply fail Composer resolution. Greenfield projects, or teams already piloting L13/PHP 8.5, are the natural first adopters and get the PHPStan/@mixin benefit for free.
Migration path (4.1.0 → 5.0.0)
composer.json in the tag to confirm the exact PHP/Laravel floor.composer.json + composer.lock only.@phpstan-ignore comments that existed only because facade calls returned mixed.Compatibility
Audit for other packages pinned to Laravel ≤ 12 before touching framework versions. Audit internal code for (a) extends on package classes, (b) type hints against package types in interfaces, and (c) any code that previously accepted mixed from a facade and now receives a concrete type. The @mixin change is additive at runtime and safe to ship, but it will change IDE behavior — expect a one-time spike in editor diagnostics.
Sequencing Framework/runtime upgrade → package major bump → static analysis ratchet → baseline cleanup → production rollout behind a flag on shipping flows. Keep the package bump non-functional in scope so any regression is attributable to a single variable.
Maintenance Low-to-moderate code maintenance, with a bus-factor consideration: this is effectively a single-maintainer package (@ptondereau). Release cadence tracks Laravel's, which is a healthy signal. The PHPStan level 10 addition is a net positive for maintainability — type-contract regressions are now caught upstream in CI rather than discovered by consumers at runtime.
Support Upstream support is GitHub issues and PRs; SLA expectations should be set accordingly. Internal support burden sits almost entirely in credential onboarding and UPS account entitlements rather than in the library. Incident triage requires correlating with the UPS status page — the package cannot distinguish "UPS is down" from "your credentials are wrong" without your own instrumentation.
Scaling The package is thin and not the bottleneck. Scaling is dominated by: UPS API quotas, OAuth token caching (a client-credentials token must be cached and reused, never fetched per request), HTTP timeouts and retry policy, and queueing non-interactive work (label generation, manifesting, end-of-day close-out). Recommended pattern: wrap facade calls in an internal service layer with backoff, jitter, and a circuit breaker, and never invoke facades directly from controllers. Note that the static analysis improvements in v5.0.0 change nothing about runtime throughput or latency.
Failure modes
@mixin improves IDE resolution but is not runtime validation. Malformed or drifted UPS payloads remain possible; keep validation at the boundary and never treat PHPStan green as behavioral correctness.Ramp-up
A Laravel-fluent developer can integrate in under a day: publish config, set credentials, make a rate call. The real ramp-up cost is UPS account provisioning, sandbox access approval, and understanding rate/ship payload semantics — measured in days, not hours. The @mixin work directly reduces this: typed facade returns give autocomplete and inline signature help, eliminating the "read the source to find out what comes back" tax that previously dominated first-integration time for teams using PhpStorm or PHPStan.
Recommendation
Adopt v5.0.0 only if you are on, or imminently moving to, Laravel 13 / PHP 8.5; otherwise pin ^4.1 and revisit. When you do adopt, fold the change into an existing static-analysis ratchet rather than a standalone initiative, and track both the maintainer's release cadence and UPS's published API sunset schedule as ongoing operational risks.
How can I help you explore Laravel packages today?