- How do I install cleverage/colissimo-bundle in a Laravel application?
- Run composer require cleverage/colissimo-bundle, then register CleverAgeColissimoBundle in your config/bundles.php file. Because it is a Symfony bundle, Laravel will not auto-discover it, so you either need a Symfony-Laravel bridge or you extract the services you need. After registration, supply your Colissimo contract credentials through configuration before making any API calls.
- Does this package work with Laravel out of the box?
- Not natively. CleverAge ColissimoBundle is built for Symfony 4, 5 and 6 and relies on Symfony's service container and bundle registration. To use it in Laravel you either run it through a Symfony microkernel or a bridge such as a Laravel-Symfony integration package, or you wrap its service classes in your own Laravel service provider and facades. The underlying classes are REST clients, so wrapping them is usually straightforward.
- What Colissimo web services does the bundle cover?
- It covers three areas: shipping labels and parcel drops, pickup point search and lookup by ID, and parcel tracking. Each area is exposed as a dedicated Symfony service, such as PickupPointsService, PickupPointByIdService and TrackingService. That means you can adopt only the parts you need without pulling in the whole carrier workflow.
- How do I configure Colissimo contract credentials from a Laravel .env file?
- Map your environment variables into a config entry, for example a colissimo key in config/services.php holding contract_number, password and api_key read via env(). The bundle itself expects contractNumber and password under its auth configuration, plus a testModeEnabled flag and letter defaults such as sender address and commercial name. In a bridged setup you translate the Laravel config array into the bundle's YAML structure, or inject the values directly into the service constructors.
- Can tracking use an API key instead of the contract number and password?
- Yes. Since v1.1.3, TrackingService::call accepts API-key authentication in addition to the contract-number and password credential pair. This lets a customer-facing tracking widget authenticate without holding the higher-privilege shipping credentials. Keep in mind you now have two secrets to provision and rotate, with different blast radii if leaked.
- Which PHP and Symfony versions are supported?
- The bundle requires PHP 7.4 or later and Symfony 4, 5 or 6. If your Laravel application runs a newer PHP version, verify the bundle's dependency constraints before installing. Also check the Symfony components version pulled in transitively, since that is where most conflicts appear.
- How do I fetch pickup points near a customer?
- Build a PickupPointsSearchModel with the zip code, city, country and a date, then pass it to PickupPointsService::call. The method returns an array of PickupPoint objects, and you read values with the generic get() accessor, for example get('id') or get('name'). If you already know the pickup point identifier, use PickupPointByIdService instead of a geographic search.
- How should I test the Colissimo integration in a Laravel project?
- Symfony's WebTestCase utilities will not help inside Laravel, so use Laravel's Http fake helpers or Mockery to stub the underlying HTTP calls. Cover both authentication modes on TrackingService::call, and enable testModeEnabled in configuration so requests hit the Colissimo sandbox. Keep assertions focused on request payloads and on how you map the response objects into your domain models.
- Is the bundle actively maintained, and how do I guard against Colissimo API changes?
- The project continues to receive patch releases, with v1.1.3 adding the API-key tracking option, which suggests ongoing maintenance. Colissimo's own API specifications can still evolve, so pin the Composer version and wrap the bundle services behind your own adapter interface. That way an API change or a package swap stays isolated from your order-processing code.
- How do I use this bundle when Colissimo is not my only carrier?
- Define a carrier-agnostic interface in your application for label creation, pickup point lookup and tracking, then implement it with the Colissimo services as one adapter. If you support multiple merchants or contracts, make the credentials tenant-aware rather than reading them from a single global config entry. Also decide up front whether tracking is real-time via callbacks or batched through Laravel queues, since that affects how you dispatch the service calls.