Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Aftership Php Sdk Laravel Package

aftership/aftership-php-sdk

Official PHP SDK for the AfterShip tracking API. Manage shipments, couriers, and tracking statuses through a clean, framework-friendly client, with Laravel integration for configuration, service providers, and dependency injection.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit The architectural verdict is unchanged: aftership/aftership-php-sdk remains a peripheral REST client that belongs behind an anti-corruption layer (TrackingGateway interface + AfterShipGateway implementation), never called from controllers or models. It still ships no Laravel service provider, config publishing, or facade. What 6.0.0 changes is the economic calculus: "support 2024-01 version" means the package is tracking AfterShip's current API surface, so the "it's a 200-line wrapper, just reproduce it" argument is weaker than it was. The interface still matters more than the package — if tracking is durable, you will outlive this library — but the build-vs-consume decision now leans marginally toward consume-behind-a-wrapper, conditional on the maintenance signals below.

Integration feasibility Mechanically unchanged: composer require aftership/aftership-php-sdk, instantiate with an API key, call methods. The friction is now in the major version bump rather than install. A 6.0.0 that targets API 2024-01 will almost certainly carry breaking changes — renamed/removed endpoints, changed payload shapes, dropped deprecated fields, and likely a raised PHP floor and tightened Guzzle constraint. The release note is a single line with no changelog, so you cannot assess blast radius from the notes; you must diff the 5.x→6.0.0 tags or read the source. Two scenarios: (a) greenfield — spike install + auth + one tracking call against the 2024-01 sandbox, half a day as before; (b) already integrated on 5.x — budget a full upgrade spike, because AfterShip's 2024-01 request/response contracts differ from prior versions and your fakes and contract tests will need updating alongside the dependency. With 0 dependents, you remain the first to exercise this in a modern Laravel stack.

Technical risk The dominant risk has changed character but not disappeared. Previously: archived, therefore unmaintained. Now: one release has been published, which is evidence of activity, not evidence of maintenance. A single major release after a gap does not establish a cadence, does not guarantee a 7.0.0 when 2024-01 is deprecated, and does not tell you whether security issues will be patched. Do not let "6.0.0 shipped" be read internally as "it's supported now." Specific risks:

  1. Version-coupled liveness — 6.0.0 supports 2024-01. If AfterShip moves to a newer version, you are back to an unmaintained client on a deprecated API, and the SDK's release history gives you no basis for predicting a follow-up.
  2. Breaking upgrade surface — major version means your integration, mocks, and status-mapping logic may all need revision; a forced upgrade (because the account is migrated to 2024-01) can land on a sprint boundary you don't control.
  3. Account/SDK version mismatch — if your AfterShip account is still provisioned on an older API version, 6.0.0 may not work until AfterShip migrates you; sequencing is a project risk, not just a code risk.
  4. Unchanged and still unaddressed: credential handling (keys through Laravel's encrypted config, not SDK constructor defaults), webhook signature verification and idempotency (the SDK does none of this), and testability (still Guzzle-level mocking, no Http::fake() story).
  5. No changelog discipline — a one-line release note for a major version is itself a maintenance signal worth weighing.

Treat the SDK as a consumable dependency only behind your own interface, with a maintained fork as the contingency — not as raw reference code, and not as an unowned upstream.

Key questions

  • Is the repository actually unarchived, and who merged 6.0.0? Commit history and issue response times are the real maintenance evidence, not the release itself.
  • What is in 5.x→6.0.0? Read the diff; the release note tells you nothing about breaking changes, removed methods, or minimum PHP/Guzzle.
  • Does 6.0.0 support only 2024-01, or multiple API versions? Multi-version support materially reduces the forced-upgrade risk.
  • Which AfterShip API version is our account provisioned on, and is there a vendor-side migration date to 2024-01? SDK choice is downstream of that answer.
  • Does 2024-01 change rate limits, pagination, or webhook payload shapes in ways that affect our queueing and status-mapping design?
  • Has the release cadence been established (i.e., is there a signal for 7.0.0), or is this a one-off?
  • Which capabilities do we actually need (tracking, webhooks, returns, EDD), and does 6.0.0 cover them — the API version bump may have added or removed surface.
  • Who owns this integration internally after handover, and are they empowered to fork or replace it?

Integration Approach

Stack fit Still poor-to-adequate as-is, good once wrapped. Laravel's Http client remains the cleanest integration point for retries, timeouts, middleware, logging, and Http::fake(). The decision rule shifts slightly: build the TrackingGateway contract first, then choose the implementation after the 6.0.0 spike. If 6.0.0 installs cleanly on your Laravel/PHP versions, targets the API version your account is on, and the diff shows tractable breaking changes — consume it behind the interface. If it drags in an incompatible Guzzle/PHP constraint, or your account isn't on 2024-01, reproduce the small surface against REST instead. In both cases: fork into packages/ or a VCS repo, pin it, and never call it outside the gateway.

Migration path

  1. Define TrackingGateway (create tracking, get status, register webhook, parse notification) — unchanged, and still the highest-value step.
  2. New: diff 5.x→6.0.0, record breaking changes and the 2024-01 contract deltas before writing any integration code.
  3. Confirm the AfterShip account's provisioned API version and, if necessary, the migration date to 2024-01.
  4. Spike 6.0.0 against the 2024-01 sandbox: install, auth, one end-to-end tracking call, one webhook payload parse.
  5. Implement AfterShipGateway — either wrapping the SDK or on Laravel Http with config-driven base URL, key, timeout, retry/backoff.
  6. Contract-test against recorded 2024-01 sandbox fixtures; if you already have 5.x fixtures, diff them, because response shapes will have moved.
  7. Swap via container binding behind a config flag; keep the previous path as a rollback for one release.

If the SDK is already in the codebase on 5.x, invert the dependency first, then upgrade the implementation behind the interface — never a big-bang 6.0.0 upgrade mid-sprint.

Compatibility Re-verify composer.json constraints before anything else — a 6.0.0 major is the most likely place for a raised PHP floor or a tightened Guzzle constraint, and a locked Guzzle major is still an immediate no-go. Confirm 6.0.0 targets the AfterShip API version your account is provisioned on; an SDK/account mismatch is a hard blocker that no amount of code work resolves. Still no extra.laravel auto-discovery, so any service provider remains yours. If you fork, expect PHPStan/Pint to flag the upstream style; exclude the fork from strict rules rather than reformatting it.

Sequencing Discovery (capability scoping + vendor contract and API-version review) → 6.0.0 release evaluation (diff, changelog archaeology, maintainer liveness check) → dependency/compatibility spike → gateway interface + fake → real implementation → webhook receiver with signature verification and queueing → contract tests against 2024-01 fixtures → rate-limit validation → cutover behind flag → decommission the old path. Still roughly 1–2 sprints for a TPM-sized slice. The release adds one gate — the upgrade evaluation — but does not change the critical path, which remains webhook hardening rather than the API calls.

Operational Impact

Maintenance Ownership is now shared-but-conditional: you still own the integration code and the fork; upstream may own the client. Do not assume it. Instrument the assumption: track release cadence, commit activity, and issue response time on the repo, and set a quarterly review trigger — "does it still install and pass contract tests on current PHP/Laravel, and is it still tracking AfterShip's current API version?" The three debts (PHP/Guzzle drift, unpatched security findings, API drift) are still yours; 6.0.0 discharges the third for now and leaves the first two untouched. The gateway abstraction remains the actual mitigation.

Support AfterShip supports its API; the SDK's support posture is now plausibly better but unproven. A single release does not create a community — assume the star count and dependent count still give you no issue triage, no Stack Overflow corpus, and no blog coverage. If the repo is unarchived, you can at least file issues; whether they get answered is a question for the liveness check. Escalation still runs through your AfterShip account team for API behavior and through your fork for client behavior. Keep pushing back on "it's an official SDK" in status meetings — it remains misleading until there's a cadence, not just a release.

Scaling Unchanged in shape: the bottleneck is AfterShip's per-account rate limits and courier latency, not the SDK. Design for queued outbound tracking calls (never inline), idempotency keys on create, exponential backoff honoring Retry-After on 429, webhook ingestion on a dedicated queue, and caching of terminal states to avoid re-polling delivered shipments. New: confirm whether 2024-01 changes rate limits, pagination, or webhook batching — a version bump is exactly when vendor quotas move, and your capacity model from the 5.x era may be stale.

Failure modes

  • AfterShip API outage or elevated latency → tracking UI degrades; need cached last-known status and a fallback message.
  • Invalid/expired API key → hard failure across the integration; alert on 401/403 rate, not just exceptions.
  • Rate limiting (429) during peak shipping → queue backlog; monitor queue depth, not just error rate.
  • Webhook floods, duplicates, or out-of-order events → status regression; enforce monotonic transitions and dedupe by event ID.
  • Forced 6.0.0 upgrade when the account is migrated to 2024-01 → breaking payload changes land on the vendor's schedule, not yours; contract tests and the gateway contain the blast radius.
  • Account provisioned on a version 6.0.0 doesn't speak → integration simply doesn't work until AfterShip migrates you; this is a coordination failure mode, not a code one.
  • Upstream goes quiet again after 6.0.0 → 2024-01 eventually deprecated with no 7.0.0; the fork becomes the plan.
  • Silent API version deprecation → calls fail or fields disappear with no SDK change on your side; contract tests catch this.
  • Unverified webhooks → spoofed delivery events; signature validation remains non-negotiable.
  • Composer lock breakage on the next framework upgrade → deployment blocked; the abstraction contains it.

Ramp-up Low for the happy path — a day for a Laravel-fluent engineer on the REST surface. The real cost is still domain knowledge: courier coverage gaps, AfterShip's status taxonomy and exception codes, tracking-number edge cases (multi-piece shipments, re-used numbers), and the webhook state machine. None of that lives in the SDK. Add: the engineer must now also understand the 2024-01 version delta — what changed from the prior API version, and which fields your status-mapping table depends on. Allocate time to read AfterShip's API docs directly and write down the status mapping table; it remains the document your support team will ask for, and this release is a good prompt to version it against the API version.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel