ivanmitrikeski/laravel-shipping
Laravel package for multi-carrier shipping quotes and shipments, supporting UPS, FedEx, Canada Post, USPS and Purolator rate and shipment APIs, with flat-rate models and standalone use outside Laravel.
ShippingProvider class) allows for easy extension or swapping of carriers.Shipment, Rate, Address, etc.) fit naturally into Laravel’s MVC structure, reducing boilerplate for shipping-related CRUD operations.HandlerStack middleware, Guzzle event subscribers, direct RequestException handling) is now coupled to a different major version..env requirements for credentials and sandbox mode simplify configuration. However, sensitive data management (e.g., rotation, encryption) must be handled externally.Http facade used by most host apps) constrains guzzlehttp/guzzle to ^7.x. If that remains true for your Laravel version, Composer cannot resolve the package at v1.0.10 alongside the framework. Confirm resolution before planning any upgrade; a failed composer update is the expected first symptom.v1.0.9 → v1.0.10) understates the blast radius. Treat v1.0.10 as a breaking upgrade for planning purposes regardless of the tag.Shipment API vs. FedEx’s CreateShipment). The package mitigates this via provider-specific classes, but custom logic may still be needed.retry helper).HandlerStack::push, Middleware::retry, or event-subscriber usage before upgrading.GuzzleHttp\Exception\* and PSR-18 ClientExceptionInterface behaviour differs enough that catch blocks written against Guzzle 7 may silently stop matching. Audit catch statements around shipping calls..env, or a secrets manager)?^7.0|^8.0), or is Guzzle 8 now a hard requirement? Does the maintainer intend to keep a v1.0.9-compatible line for apps pinned to Laravel’s Guzzle 7?dispatch(new CreateShipmentJob($data))).guzzlehttp/guzzle per project. If your app or framework requires Guzzle 7, you cannot adopt v1.0.10 without a resolution strategy. Options, in order of preference:
composer update --with-all-dependencies) only after confirming the framework tolerates Guzzle 8 — not recommended without maintainer guidance.ShippingProvider directly). Not recommended for greenfield projects. Note that non-Laravel consumers face the same Guzzle 8 major-version decision.composer why guzzlehttp/guzzle and composer why-not guzzlehttp/guzzle ^8.0 to see who pins what.catch blocks touching shipping calls..env with sandbox credentials for all target providers.ivanmitrikeski/laravel-shipping:v1.0.10 and run the full provider contract suite in sandbox before touching production.v1.0.9 documented as the rollback target in the runbook.psr/http-message v2 — confirm no transitive package pins PSR-7 v1. Deprecated-function checks are less relevant than PSR interface version checks now.^8.0 only or ^7.0|^8.0. This single fact determines whether the upgrade is a drop-in or a project-wide dependency event.Shipping classes or Facades. Use aliases if needed. Add Guzzle-8-vs-Laravel-HTTP-client conflict to the known-issues list.php artisan migrate).php artisan vendor:publish --provider="IvanMitrikeski\Shipping\ShippingServiceProvider").config(['shipping.providers.ups' => UpsProvider::class])).OrderCreated event → calculate rates).composer update ivanmitrikeski/laravel-shipping).v1.0.9 or v1.0.10 explicitly rather than using a floating constraint; a patch tag now carries breaking dependency weight..env updates for provider credentials (e.g., using Laravel Forge or a secrets manager).SHIPPING_SANDBOX=true for local testing. Log provider responses for troubleshooting:
$provider->setDebug(true);
On Guzzle 8, confirm setDebug still routes through the new middleware stack; if not, attach your own logging middleware.spatie/fork).CreateShipment::dispatch($shipmentData)->onQueue('shipping');
$rates = Cache::remember("rates_{$origin}_{$destination}", now()->addMinutes(5), fn() =>
$provider->getRates($origin, $destination)
);
shipments table for read-heavy workloads (e.g., add indexes for status, carrier).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Provider API downtime | Orders stuck in checkout | Fallback to a secondary carrier or manual override. |
| Invalid credentials | All requests fail | Automated alerting (e.g., Laravel Healthcheck). |
| Rate calculation timeouts | Poor UX during checkout | Queue requests and notify user via email. |
| Carrier-specific validation errors | Failed shipments | Pre-validate addresses/carrier rules. |
| Database connection issues | Lost shipment records | Use transactions and retry logic. |
| Composer conflict on Guzzle 8 (new) | Update blocked or app-wide dependency churn | Pin v1.0.9; resolve via Phase 0 audit before attempting upgrade. |
| Custom middleware incompatible (new) | Silent loss of logging/retry/header injection; shipping calls fail or misbehave post-upgrade | Inventory middleware in Phase 0; port and test in sandbox first. |
| Changed exception classes (new) | Catch blocks stop matching; unhandled exceptions surface as 500s at checkout | Re-audit catch statements; add a fallback Throwable handler around shipping calls. |
Shipment API vs. UPS). Add: Guzzle 8 migration differences and PSR-7 v2 semantics for anyone touching the transport.403 Forbidden).composer why-not check) so a routine composer update cannot silently pull v1.0.10 into a Guzzle 7 project.How can I help you explore Laravel packages today?