PHPackages                             medelse/referer-cookie-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. medelse/referer-cookie-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

medelse/referer-cookie-bundle
=============================

The RefererCookieBundle is a Symfony Bundle to save referer into cookie when exists. Than cookie (referer) can be used later.

1.0.0(4y ago)08.1kMITPHPPHP &gt;=7.0CI failing

Since Jun 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Medelse/referer-cookie-bundle)[ Packagist](https://packagist.org/packages/medelse/referer-cookie-bundle)[ RSS](/packages/medelse-referer-cookie-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

MedelseRefererCookieBundle
==========================

[](#medelsereferercookiebundle)

The **MedelseRefererCookieBundle** is a Symfony Bundle to save referer into cookie when exists. Than cookie (referer) can be used later.

Features include:

- Compatible Symfony version 3 &amp; 4

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

[](#installation)

### Through Composer:

[](#through-composer)

Install the bundle:

```
$ composer require medelse/referer-cookie-bundle

```

### Register the bundle in app/AppKernel.php (Symfony V3):

[](#register-the-bundle-in-appappkernelphp-symfony-v3)

```
// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new Medelse\RefererCookieBundle\MedelseRefererCookieBundle(),
    );
}
```

### Register the bundle in app/AppKernel.php (Symfony V4):

[](#register-the-bundle-in-appappkernelphp-symfony-v4)

```
// config/bundles.php

return [
    // ...
    Medelse\RefererCookieBundle\MedelseRefererCookieBundle::class => ['all' => true],
];
```

### Parameters :

[](#parameters-)

```
medelse_referer-cookie:
    name: 'referer' #The Name of cookie (default value "referer")
    lifetime: 604800 #The lifetime of cookie in seconds (default 604800 => 7 days)
    path: '/' #The path on the server in which the cookie will be available on (default '/')
    domain: '' #The (sub)domain that the cookie is available to (default '' so use current domain)
    overwrite: true|false #If overwrite all referer values when even one is set in get (default true)
    secure: true|false #Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client (default false)
    httponly: true|false #When TRUE the cookie will be made accessible only through the HTTP protocol (default false)
    auto_init: true|false #If true, run init and create cookie automatically. If false you have to call init manually (default true)
    track_internal_referer: true|false #If true, track on cookie last external and last internal referer (default false)
    internal_domains: [] #Array of domains who match 'internal'. If empty, watch if referer match external list. Wildcard for (sub)domain can be used
    external_domains: [] #Array of domains who match 'external'. If empty, all referes not internal are saved as external. Wildcard for (sub)domain can be used
```

Usage
-----

[](#usage)

### Public service

[](#public-service)

The service name available is `medelse_referer-cookie.referer-cookie`

### Basic Usage

[](#basic-usage)

```
$this->get('medelse_referer_cookie.referer_cookie')->init(); // just init - read referer params and cookie and save new values. (optionnal if auto_init config is TRUE or automatically called when call get() method)
$this->get('medelse_referer_cookie.referer_cookie')->get(); // get all cookies as array
$this->get('medelse_referer_cookie.referer_cookie')->get('internal'); // get referer_internal (can use 'internal' or 'external')
$this->get('medelse_referer_cookie.referer_cookie')->get('source'); // get referer_internal
```

License
-------

[](#license)

This bundle is under the MIT license.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

1798d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fb71f432d272e365a85590b6a3cf424b6742c6b1da513f2b444237eac305ae3?d=identicon)[Bilbous](/maintainers/Bilbous)

---

Top Contributors

[![thomas-medelse](https://avatars.githubusercontent.com/u/67781232?v=4)](https://github.com/thomas-medelse "thomas-medelse (4 commits)")

---

Tags

cookiereferermedelse

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/medelse-referer-cookie-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/medelse-referer-cookie-bundle/health.svg)](https://phpackages.com/packages/medelse-referer-cookie-bundle)
```

###  Alternatives

[spatie/laravel-cookie-consent

Make your Laravel app comply with the crazy EU cookie law

1.5k4.7M20](/packages/spatie-laravel-cookie-consent)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

213396.7k](/packages/statikbe-laravel-cookie-consent)[oveleon/contao-cookiebar

Contao Cookiebar

63124.1k6](/packages/oveleon-contao-cookiebar)[dirkpersky/typo3-dp_cookieconsent

Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)

36201.3k1](/packages/dirkpersky-typo3-dp-cookieconsent)[xsuchy09/utm-cookie

Utm-Cookie saves utm parameters from url into cookie with defined lifetime (default 7 days). Than cookie (utm) can be used later without parsing google or any other cookies.

1456.1k2](/packages/xsuchy09-utm-cookie)[bizley/cookiemonster

Yii extension to manage cookie warning.

2020.1k1](/packages/bizley-cookiemonster)

PHPackages © 2026

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