PHPackages                             paloma/client-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. paloma/client-bundle

AbandonedArchivedSymfony-bundle

paloma/client-bundle
====================

2.3.0(7y ago)02.5k2MITPHPPHP &gt;=5.5

Since Nov 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/paloma-middleware/PalomaClientBundle)[ Packagist](https://packagist.org/packages/paloma/client-bundle)[ RSS](/packages/paloma-client-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

Paloma Client Symfony Bundle
============================

[](#paloma-client-symfony-bundle)

A Symfony bundle for easy integration of the [paloma/shop-client](https://github.com/paloma-middleware/shop-client-php)package into a Symfony application.

Features:

- Configure your Paloma shop client within a Symfony app configuration
- Paloma client factory and convenience service definition
- Integration into the Symfony web profiler

Usage
-----

[](#usage)

To get the default Paloma client (read below what that means):

```
$client = $container->get('paloma_client.default_client');
```

Instead of requesting the default client "at runtime" over the `$cotainer->get()` method you can also make use of Symfony's auto wiring feature by using the `DefaultPalomaClient` class:

```
public function mySymfonyAction(DefaultPalomaClient $paloma) {
  $categories = $paloma->catalog()->categories();
}
```

To get the client factory in order to get other clients than the default one:

```
$factory = $container->get('paloma_client.client_factory');
$defaultClient = $factory->getDefaultClient();
$myOtherChannelClient = $factory->getClient('my-other-channel', 'my-locale');
```

Installation
------------

[](#installation)

Add the bundle to your application:

```
composer require paloma/client-bundle
```

Then add add it to your `AppKernel.php`:

```
$bundles = [
    [...]
    new Paloma\ClientBundle\PalomaClientBundle(),
    [...]
];
```

Configuration
-------------

[](#configuration)

```
paloma_client:
    base_url: 'https://my-api-endpoint'  # Probably get this from parameters
    api_key: MyApiKey  # Probably get this from parameters
    # The log format to use for Paloma requests which are deemed successful.
    # If not set the default specified in paloma/shop-client will be used.
    log_format_success: ~
    # The log format to use for Paloma requests which are deemed failed.
    # If not set the default specified in paloma/shop-client will be used.
    log_format_failure:  ~
    # The cache provider to use as the caching backend. Has to be a provider
    # which implements the PSR-6 CacheItemPoolInterface. Ideally one uses
    # the php-cache/adapter-bundle to define and configure a provider service.
    cache_provider: ~
```

Channels and Locales
--------------------

[](#channels-and-locales)

Paloma is built around the notion of channels. One Paloma setup may consist of many different channels. Good examples of channels are "country" or "tenant" (in a multi tenant system). Each Paloma API endpoint is prefixed by the channel (see [Paloma API docs](https://docs.paloma.one/) for more information). In addition to channels most API endpoints also take a prefix for the locale of the request. Paloma itself cannot determine the correct channel or locale and it is the frontend application's job to define that.

This job is normally done by applying some URL scheme to the frontend application, like for example `https://.myclient.com///`. In this example the resulting Paloma channel might be `_` and locale ``. The important part is that channels are project specific and can change in syntax and semantics. For that reason it has to be solved again in every application.

The standard way to solve this is to install a request listener which analyzes the incoming URL and determines the channel and locale from that URL. It then sets the default channel using:

```
$factory = $container->get('paloma_client.client_factory');
$factory->setDefaultChannel('');
$factory->setDefaultLocale('');
```

After this no other code in the application needs to care about channels or locales. This should handle most common use cases as the need to address multiple channels or locales within the same request is rare.

Paloma trace ID
---------------

[](#paloma-trace-id)

Paloma allows for the specification of a trace ID alongside every request. This helps to correlate requests observed on Paloma and the client application with each other.

The Paloma trace ID has to be a string which is exactly 8 characters long and consists of only lower case characters a-z and digits 0-9.

It is possible to set this trace ID within the `ClientFactory` such that it will be added to every request to Paloma which is sent through a client created by that factory. A convenient location to set the trace ID is probably in the same area as the default channel and locale is set.

It can be done like this:

```
$factory = $container->get('paloma_client.client_factory');
# This is just an example of how to specify a trace ID, one might use more
# elaborate approaches which include session and request information.
$factory->setPalomaTraceId(substr(uniqid(), 0, 8));
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~97 days

Total

14

Last Release

2585d ago

Major Versions

1.3.1 → 2.0.02018-03-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/3040e7efc5d9bf912864758bec0e4e70d5acdc468d5239e960d95431d5c65b74?d=identicon)[pkraeutli](/maintainers/pkraeutli)

---

Top Contributors

[![fchris82](https://avatars.githubusercontent.com/u/1598178?v=4)](https://github.com/fchris82 "fchris82 (5 commits)")[![ajalovec](https://avatars.githubusercontent.com/u/1556163?v=4)](https://github.com/ajalovec "ajalovec (1 commits)")[![avolkart](https://avatars.githubusercontent.com/u/24896337?v=4)](https://github.com/avolkart "avolkart (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paloma-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/paloma-client-bundle/health.svg)](https://phpackages.com/packages/paloma-client-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29733.3k](/packages/sulu-skeleton)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
