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

Mondial Relay Laravel Package

ernadoo/mondial-relay

Framework-agnostic PHP client for Mondial Relay: create shipment labels via the V2 REST API and search relay points via the V1 SOAP API. Supports sandbox testing, tracking URLs, and label PDFs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Still strong for Laravel/PHP commerce or fulfilment services. v4.2.0 broadens the checkout-side surface without changing the core client boundaries: MondialRelayClient, RestShipmentClient, and SoapParcelShopClient remain the integration seams, while ParcelShopSearchRequest::around($countryCode, $latitude, $longitude) and the new latitude/longitude arguments let a TPM support map/geolocation relay-point pickers as well as postcode search. ParcelShop::schedule() with OpeningHours (on($isoDay), isOpenOn(), isAlwaysOpen(), isEmpty()) removes ad hoc parsing of "0930-1300 1400-1900", and ParcelShop::$locker / $directions let the UI distinguish lockers from staffed counters and show access instructions. PSR-3 logging and the shared MondialRelayException hierarchy are unchanged.
  • Integration feasibility: High and non-breaking. The release notes are purely additive: existing postcode search, openingHours raw values, and all v4.1.0 credential names (apiLogin, apiPassword, brandCode, privateKey) are untouched, so the v4.1.0 named-argument migration remains the only outstanding breaking change to manage. New behaviour is opt-in: teams can adopt coordinate search, schedule(), locker, and directions independently. Note that local validation now rejects a request with no postcode and no coordinates, a single coordinate, or out-of-range coordinates via \InvalidArgumentException before the remote call — this replaces an API-side rejection, so error handling paths shift from ApiException to a local exception.
  • Technical risk: Low-to-medium. Migration risk for v4.2.0 is minimal (additive API, no renames), but two subtleties matter: (1) \InvalidArgumentException is not part of the MondialRelayException hierarchy, so catch blocks built around configuration/transport/API failures will not intercept it — map it to a form-validation error instead; (2) schedule() introduces day-of-week semantics via ISO days, so display must be timezone- and locale-aware, and isEmpty()/isAlwaysOpen() must be handled explicitly rather than treated as parse failures. locker and directions are optional/nullable and must not be assumed present. Existing risks persist: external API/network dependency, getErrors() integer keys for numeric codes, and app-side log/PII review.
  • Key questions: Which clients and call sites use named arguments (unchanged from v4.1.0)? Do config keys or DI bindings expose old credential names? Will checkout offer coordinate search, postcode search, or both, and is browser geolocation consent covered by the privacy notice? How will \InvalidArgumentException be caught and surfaced in the search form? How will opening hours be rendered across timezones and locales, and is schedule() the only consumer or does any downstream system read raw openingHours? Do we surface locker vs pickup-point filtering, and are directions safe to display verbatim? Are composer PHP/Laravel constraints still satisfied? Are production credentials and brand activation confirmed with sandbox parity for the new coordinate path? How will label creation be queued, retried, and made idempotent? Is relay-point search cached, and by what key (postcode, coordinate grid)? Are TransportException retries and alerts defined?

Integration Approach

  • Stack fit: Good for Laravel. Keep injecting a PSR-3 logger via setLogger(), binding shipping clients in the container and wrapping calls in a domain service. Continue using ConfigurationException for deploy/config failures, TransportException for transient/infrastructure failures, and ApiException for business/validation rejections; add \InvalidArgumentException as an input-validation failure at the controller/form-request boundary. Relay-point search (postcode or coordinates) belongs in checkout; label creation belongs in order fulfilment and may be queued. A small presenter/view-model around ParcelShop (schedule(), locker, directions) keeps Blade/Inertia templates free of Mondial Relay vocabulary.
  • Migration path: Pin v4.2.0. No code change is required to keep current behaviour, so treat this as an additive feature release on top of the v4.1.0 functional repair. If v4.1.0 is not yet deployed, sequence it first (named-argument audit, logger wiring, exception mapping) and land v4.2.0 afterwards; if v4.1.0 is live, upgrade directly and adopt new APIs feature by feature. Run sandbox tests for postcode search, coordinate search, and label creation/PDF download before production.
  • Compatibility: No breaking changes declared. openingHours retains raw values, so existing parsers keep working alongside schedule(). New arguments are additions to ParcelShopSearchRequest; positional callers of existing constructors are unaffected, but new optional arguments should be passed by name to avoid re-auditing later. Confirm composer constraints for PHP/Laravel, and verify framework auto-discovery/config publishing still behaves. \InvalidArgumentException is a new failure surface for callers that previously relied on ApiException for malformed searches.
  • Sequencing: 1) Update dependency to v4.2.0 in a branch; 2) confirm v4.1.0 named-argument changes are already applied; 3) add coordinate search behind a feature flag, plus form-level validation mirroring the library's rules; 4) wire \InvalidArgumentException into the validation error path; 5) build the ParcelShop presenter for schedule(), locker, directions; 6) run sandbox tests for postcode search, coordinate search, and labels; 7) deploy to staging with monitored real credentials; 8) canary the new search mode and relay-point rendering; 9) monitor rejection, warning, transport, and local-validation rates.

Operational Impact

  • Maintenance: Low incremental cost. Additive release, no deprecations, no renames. Pin exact versions and keep a sandbox-backed integration test suite covering postcode search, coordinate search, schedule parsing, and label creation; new tests should assert isEmpty()/isAlwaysOpen() and null locker/directions cases so upstream parsing changes are caught early.
  • Support: Slightly improved. Structured schedule() reduces "opening hours look wrong" tickets caused by bespoke string parsing, and locker lets support explain failed collections at unattended points. Keep the existing exception taxonomy triage (ConfigurationException = config, TransportException = infrastructure, ApiException = Mondial Relay rejection) and add a distinct bucket for local \InvalidArgumentException so malformed search input is not misrouted to the API-failure queue. Logging rules are unchanged: no credentials or bodies, retained and access-controlled, with error-code translation covering integer keys.
  • Scaling: Coordinate search has the same external-call cost profile as postcode search, so cache by a stable key (postcode, or a rounded lat/long grid) and consider debounce on map pan/zoom in the UI. Queue label creation, set timeouts, and apply retry/backoff for TransportException. Info-level shipment/search logging may grow if coordinate search is used interactively; tune log levels and avoid logging precise coordinates without a privacy review.
  • Failure modes: Local \InvalidArgumentException for missing/partial/out-of-range coordinates must be caught and rendered as a validation message, not a generic error page. ConfigurationException still fails fast before the remote call; TransportException means retry/alert; ApiException means validation/business rejection; warnings log but do not block. Test the boundary between "no postcode" and "no coordinates", the single-coordinate case, out-of-range values, empty schedules, always-open points, and shops without directions. Sandbox/prod differences, timeout behaviour, and PDF retrieval failures remain in scope. Monitor API rejection codes, local validation error rate, transport error rate, and label creation success.
  • Ramp-up: Low-to-moderate for a Laravel team, marginally lower than v4.1.0 because nothing existing must change. Developers need Mondial Relay credential, brand, and private-key setup plus sandbox familiarity; frontend work adds opening-hours rendering and geolocation consent. TPM should schedule a short spike for the v4.1.0 named-argument audit (if outstanding), plus coordinate validation mapping and the ParcelShop presenter, before committing to delivery dates.
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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table