webapix/mygls-sdk
A PHP SDK for the MyGLS API that streamlines creating shipments, generating labels, printing parcels, and tracking deliveries. It offers a clean client for integrating GLS shipping workflows into Laravel or any PHP application.
Architecture fit. webapix/mygls-sdk is a framework-agnostic, lightweight PHP wrapper over the MyGLS (GLS logistics) REST API. That is the right shape for Laravel: it should sit behind your own domain interfaces (LabelService, TrackingService, PickupPointService) and be bound in a service provider, never called directly from controllers or models. The SDK provides convenience (auth, request building, DTOs) but no domain model of its own, so the real architecture decision is yours, not the package's. Verdict: acceptable as a contained adapter for a GLS-only shipping flow in GLS markets (HU/CZ/SK/RO/HR/SI/RS and similar); not acceptable as a foundation for a multi-carrier logistics platform without an abstraction layer around it.
Integration feasibility. Composer-installable, MIT-licensed, small surface area. A competent Laravel developer can get label creation and tracking working against a sandbox in days, not weeks. The unknowns are packaging hygiene rather than conceptual difficulty: PHP version constraints, whether it uses PSR-18/PSR-7 or hard-depends on a specific Guzzle major (which can collide with Laravel's HTTP client stack), whether responses are typed DTOs or raw arrays, and whether errors are a coherent exception hierarchy or generic throws. Those determine whether integration is a 3-day spike or a 3-week rework.
Technical risk — material.
unknown, and the only identifier is a Packagist-style name. You cannot approve this dependency until the actual source repository, maintainer identity, and Packagist record are verified and pinned.Key questions to answer before approval.
Stack fit. Laravel-native integration is straightforward: publishable config, credentials from a secrets manager (not committed .env), a singleton client binding, and a thin anti-corruption layer that maps SDK responses to your own shipment DTOs. Use Laravel's HTTP client or the SDK's PSR-18 client with explicit timeouts, a retry policy for 5xx/429 only, and structured logging with correlation IDs.
Migration path.
Compatibility. Pin an exact version with a committed lockfile — no dev-master, no floating constraints. Verify PHP 8.2/8.3 and Laravel 10/11/12 support, and specifically check Guzzle major-version conflicts with Laravel's HTTP client. Run composer audit in CI and add the package to Dependabot/Renovate with an internal owner.
Sequencing (recommended).
composer audit, authenticate against sandbox/production-test, create one label, cancel it, fetch one tracking status. Produce a go/no-go memo.shipments and labels tables, unique constraint per order/parcel, idempotency key strategy, label PDFs in object storage (S3) not the database, retention policy.Maintenance. This is the dominant risk. Assume low upstream activity: budget a named internal owner and roughly 1–3 engineer-days per quarter for dependency bumps, GLS API changes, and patches. Establish a staleness policy — if upstream has no release or issue response for 6–12 months, schedule replacement (either a maintained fork or a direct HTTP client you own). Track the future-dated release anomaly as an open governance item until resolved.
Support. No vendor support; GLS support will not debug third-party SDK issues. Escalation is best-effort GitHub issues plus your internal owner. Critical runbook requirement: a documented manual fallback — print labels directly in the MyGLS web portal — so a broken SDK never blocks the warehouse. Document credentials rotation and the exact error codes that mean "call the portal."
Scaling. The bottleneck is GLS rate limits and per-request latency (typically hundreds of milliseconds to a few seconds per label), not PHP. Queue everything, cap concurrency per GLS account, and use a circuit breaker so an GLS outage degrades gracefully instead of saturating workers. Store label artifacts in object storage with lifecycle rules. Q4 peak is the real test: run a load rehearsal at expected peak ×2 before November, and pre-provision queue workers.
Failure modes to design for.
Ramp-up. A mid-level Laravel engineer needs roughly 1–2 days to learn the SDK surface (it is small) and about a week to be productive on the adapter, tests, and runbooks; a second engineer needs half a day for on-call readiness. TPM-level effort is front-loaded into due diligence: provenance verification, GLS contract/terms confirmation, and a written risk acceptance for adopting an unofficial, low-adoption dependency. Given the composite score (~18.6/100), treat this as a high-risk, narrowly-scoped dependency: approve only inside an adapter with a manual fallback, an internal owner, and a scheduled review date — do not let it become load-bearing infrastructure.
How can I help you explore Laravel packages today?