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.
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 channel.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.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.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.Réécriture pour Symfony 6.4 / 7.x.
Symfony\Component\HttpClient\Psr18Client injecté dans RestShipmentClient — les appels REST apparaissent dans le panel HTTP du Profiler Symfony sans configuration supplémentairesymfony/http-client + nyholm/psr7 maintenant en dépendances directes (plus en suggest)ernadoo/recipesernadoo/mondial-relay: ^3.0Use of quentinbontemps/php-mondialrelay-api
How can I help you explore Laravel packages today?