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(5y 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 2w 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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

1845d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/630794?v=4)[Cenatiempo Yannick](/maintainers/Bilbous)[@Bilbous](https://github.com/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

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[yceruto/formflow-bundle

Create and manage multistep forms

2414.8k](/packages/yceruto-formflow-bundle)

PHPackages © 2026

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