PHPackages                             benjamin-rqt/correlation-id - 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. benjamin-rqt/correlation-id

ActiveLibrary

benjamin-rqt/correlation-id
===========================

0.0.1(3mo ago)0229↓56.7%PHPPHP &gt;=8.3

Since Feb 9Pushed 3mo agoCompare

[ Source](https://github.com/BenjaminRqt/Correlation-id)[ Packagist](https://packagist.org/packages/benjamin-rqt/correlation-id)[ RSS](/packages/benjamin-rqt-correlation-id/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (3)Used By (0)

Correlation ID
==============

[](#correlation-id)

[![PHP >= 8.3](https://camo.githubusercontent.com/1560aa96bafdcf9dac246f22700b1c95c226b63390c6576e9687fb95c3ebd3d8/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d253545382e3326636f6c6f723d373837434235267374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://camo.githubusercontent.com/1560aa96bafdcf9dac246f22700b1c95c226b63390c6576e9687fb95c3ebd3d8/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d253545382e3326636f6c6f723d373837434235267374796c653d666f722d7468652d6261646765266c6f676f3d706870)[![Symfony >= 6.0](https://camo.githubusercontent.com/8893996e8bd7b78a9247896356ef31dcbc6e1fd2a15a5c8443e4669dd7d8c8ea/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53796d666f6e79266d6573736167653d253545362e3026636f6c6f723d373837434235267374796c653d666f722d7468652d6261646765266c6f676f3d73796d666f6e79)](https://camo.githubusercontent.com/8893996e8bd7b78a9247896356ef31dcbc6e1fd2a15a5c8443e4669dd7d8c8ea/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53796d666f6e79266d6573736167653d253545362e3026636f6c6f723d373837434235267374796c653d666f722d7468652d6261646765266c6f676f3d73796d666f6e79)[![phpstan Level 8](https://camo.githubusercontent.com/63fdcaad2824050ece8710e7c66dbe113f7e9137d721286f5f77ad50fac2d681/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d7068707374616e266d6573736167653d4c6576656c2532303826636f6c6f723d344341463530267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/63fdcaad2824050ece8710e7c66dbe113f7e9137d721286f5f77ad50fac2d681/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d7068707374616e266d6573736167653d4c6576656c2532303826636f6c6f723d344341463530267374796c653d666f722d7468652d6261646765)

A Symfony bundle that provides an easy way to manage a **Correlation ID** across your application.

---

Features
--------

[](#features)

- Adds a Correlation ID to your application logs
- Propagates the Correlation ID to other applications via HTTP headers
- Exposes the Correlation ID in the response headers
- Automatically reuses the Correlation ID from incoming requests when present
- Generates a new Correlation ID when none is provided

---

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

[](#installation)

```
composer require benjamin-rqt/correlation-id
```

---

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

[](#configuration)

By default, the Correlation ID header name is `X-Correlation-ID`. You can override it if needed.

### Available options

[](#available-options)

- `header_name` – The HTTP header name used for the Correlation ID.

`config/packages/correlation_id.yaml`:

```
correlation_id:
    header_name: 'X-Correlation-ID'
```

---

HTTP Behavior
-------------

[](#http-behavior)

- If a Correlation ID is present in the incoming request headers, it will be reused.
- Otherwise, a new Correlation ID will be generated and used for the entire request lifecycle.
- The Correlation ID is always added to the response headers.

---

Messenger Middleware
--------------------

[](#messenger-middleware)

This bundle provides a Messenger middleware that automatically attaches the Correlation ID to dispatched messages.

To enable it, simply add the middleware to your Messenger bus configuration.

```
framework:
    messenger:
        buses:
            messenger.bus.default:
                middleware:
                    - correlation_id.middleware
```

This ensures that:

- The Correlation ID from the HTTP request is propagated to Messenger messages
- The same Correlation ID is available when handling messages asynchronously

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

Unknown

Total

1

Last Release

99d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c447dd77b31fbd9d6c2084bfb5bb856db0f445ca8dedf38c6326366e1cd3014?d=identicon)[Benjamin Rqt](/maintainers/Benjamin%20Rqt)

---

Top Contributors

[![brouquet-company](https://avatars.githubusercontent.com/u/150364764?v=4)](https://github.com/brouquet-company "brouquet-company (5 commits)")[![BenjaminRqt](https://avatars.githubusercontent.com/u/14540524?v=4)](https://github.com/BenjaminRqt "BenjaminRqt (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/benjamin-rqt-correlation-id/health.svg)

```
[![Health](https://phpackages.com/badges/benjamin-rqt-correlation-id/health.svg)](https://phpackages.com/packages/benjamin-rqt-correlation-id)
```

###  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)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[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)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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