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 Bundle Laravel Package

ernadoo/mondial-relay-bundle

Symfony bundle for the ernadoo/mondial-relay PHP SDK. Autowires MondialRelayClientInterface, adds Symfony Profiler logging for calls and durations, and provides a Twig helper for the relay-point selection widget. Requires PHP 8.2+ and Symfony 6.4 or 7.x.

View on GitHub
Deep Wiki
Context7
v3.3.0

Added

  • api relay point picker: a list and a Leaflet map fed by the relay point search API, as an alternative to the official Mondial Relay widget (no jQuery, no Mondial Relay script, your own styles). Its search endpoint ([@ErnadooMondialRelayBundle](https://github.com/ErnadooMondialRelayBundle)/config/routes.php) caches results and rate-limits searches per IP address. Choose it with relay_point_picker.mode: api or mondial_relay_widget(picker: 'api'). Labels translated in English and French.
  • mondial_relay_brand_code() Twig function.
  • MondialRelayErrorMessage::fromException(): turns a Mondial Relay failure into a message for users (TranslatableInterface, ErnadooMondialRelayBundle domain, English and French): invalid phone number, unusable relay point, parcel weight, postal code, country, credentials, Mondial Relay unavailable, other rejections. Based on the codes returned by the sandbox; unknown codes fall back to a generic message. Requires symfony/translation-contracts.
  • Mondial Relay API errors, warnings and created shipments are logged in every environment, on the mondial_relay channel.

Changed

  • Credentials are named after MR Connect: brand_code (formerly customer_id), api_login (login), api_password (password), private_key (secret_key). The former options still work but are deprecated, and so is mondial_relay_customer_id(). The recipe uses MONDIAL_RELAY_BRAND_CODE, MONDIAL_RELAY_API_LOGIN, MONDIAL_RELAY_API_PASSWORD and MONDIAL_RELAY_PRIVATE_KEY.
  • Only the brand code is required: the API user is needed to create labels, the private key to search relay points through the API. A missing credential fails the feature that needs it with a clear message.
  • Requires ernadoo/mondial-relay 4.1: label creation did not work with 4.0.x, and 4.1 brings the logging and the clear messages about missing credentials.
  • Service ids follow the Symfony bundle best practices: they are prefixed with the bundle alias (ernadoo_mondial_relay.client, ernadoo_mondial_relay.shipment_client, ernadoo_mondial_relay.parcel_shop_client, ernadoo_mondial_relay.http_client…) instead of class names, and private. Inject MondialRelayClientInterface (the autowiring alias, unchanged); fetching MondialRelayClient::class, RestShipmentClient::class, SoapParcelShopClient::class or Psr18Client::class from the container, or the interface with $container->get(), no longer works. The bundle no longer registers Symfony\Component\HttpClient\Psr18Client, which could collide with the application's own service.
v3.0.0

Breaking changes

Réécriture pour Symfony 6.4 / 7.x.

Ce qui change

  • AbstractBundle : configure() + loadExtension(), plus d'Extension/Configuration séparées
  • PSR-18 natif : Symfony\Component\HttpClient\Psr18Client injecté dans RestShipmentClient — les appels REST apparaissent dans le panel HTTP du Profiler Symfony sans configuration supplémentaire
  • symfony/http-client + nyholm/psr7 maintenant en dépendances directes (plus en suggest)
  • ProfilingMondialRelayClient : panel custom dans la toolbar (durée, paramètres, erreurs)
  • Recette Flex auto-installée depuis ernadoo/recipes

Prérequis

  • PHP 8.2+, Symfony 6.4 ou 7.x
  • ernadoo/mondial-relay: ^3.0
2.0.0

Use of quentinbontemps/php-mondialrelay-api

1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0
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.
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
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style