PHPackages                             rudak/disclaimer-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. rudak/disclaimer-bundle

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

rudak/disclaimer-bundle
=======================

Modern Symfony Bundle for French Legal Notices (Mentions Légales) with RGPD 2025 compliance

255TwigCI failing

Since Dec 9Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/rudak/DisclaimerBundle)[ Packagist](https://packagist.org/packages/rudak/disclaimer-bundle)[ RSS](/packages/rudak-disclaimer-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

DisclaimerBundle
================

[](#disclaimerbundle)

[![CI](https://github.com/rudak/DisclaimerBundle/workflows/CI/badge.svg)](https://github.com/rudak/DisclaimerBundle/actions)

Modern Symfony Bundle for French Legal Notices (Mentions Légales) with RGPD 2025 compliance.

Features
--------

[](#features)

- 🇫🇷 **RGPD 2025 compliant** French legal notice template
- ⚡ **Modern Symfony** support (^5.4 || ^6.4 || ^7.0)
- 🐘 **PHP 8.1+** with strict types and modern features
- 🎨 **Twig-only** rendering with customizable templates
- 🔧 **PSR-4** autoloading with autowire/autoconfigure
- 🧪 **Quality tools**: PHPStan, Rector, PHPUnit
- 📦 **Easy to customize** and extend

Requirements
------------

[](#requirements)

- PHP ^8.1 || ^8.2 || ^8.3
- Symfony ^5.4 || ^6.4 || ^7.0

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

[](#installation)

### 1. Install the bundle via Composer

[](#1-install-the-bundle-via-composer)

```
composer require rudak/disclaimer-bundle
```

### 2. Enable the bundle

[](#2-enable-the-bundle)

If you're not using Symfony Flex, add the bundle to your `config/bundles.php`:

```
return [
    // ...
    Rudak\DisclaimerBundle\RudakDisclaimerBundle::class => ['all' => true],
];
```

### 3. Import the routes

[](#3-import-the-routes)

Create or update `config/routes/rudak_disclaimer.yaml`:

```
rudak_disclaimer:
    resource: '@RudakDisclaimerBundle/Resources/config/routes.php'
    type: php
```

Or if you prefer PHP configuration in `config/routes.php`:

```
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes) {
    $routes->import('@RudakDisclaimerBundle/Resources/config/routes.php');
};
```

Usage
-----

[](#usage)

### Access the disclaimer page

[](#access-the-disclaimer-page)

Once installed, the disclaimer page is available at:

```
https://your-domain.com/disclaimer

```

### Add a link in your templates

[](#add-a-link-in-your-templates)

Use the Twig function to add a link to the disclaimer page:

```
{{ disclaimer_link() }}
{# Outputs: Mentions légales #}

{{ disclaimer_link('Legal Notice') }}
{# Outputs: Legal Notice #}

{{ disclaimer_link('Mentions légales', { class: 'footer-link', target: '_blank' }) }}
{# Outputs: Mentions légales #}
```

Customization
-------------

[](#customization)

### Override the disclaimer template

[](#override-the-disclaimer-template)

The bundle provides a default RGPD 2025 compliant template, but you can easily override it:

1. Create a file at `templates/bundles/RudakDisclaimerBundle/disclaimer/page.html.twig`
2. Customize the content according to your needs

Example override:

```
{% extends '@RudakDisclaimer/disclaimer/layout.html.twig' %}

{% block title %}Our Legal Notice{% endblock %}

{% block disclaimer_content %}

    Legal Notice
    Your custom content here...

    {# You can also extend the original template #}
    {{ parent() }}

{% endblock %}
```

### Override the layout

[](#override-the-layout)

To integrate the disclaimer with your site's design, override the layout:

Create `templates/bundles/RudakDisclaimerBundle/disclaimer/layout.html.twig`:

```
{% extends 'base.html.twig' %}

{% block body %}
    {% block disclaimer_content %}{% endblock %}
{% endblock %}
```

### Customize the controller

[](#customize-the-controller)

If you need more control, you can extend or replace the controller:

```
namespace App\Controller;

use Rudak\DisclaimerBundle\Controller\DisclaimerController as BaseController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

class CustomDisclaimerController extends BaseController
{
    #[Route('/legal', name: 'app_disclaimer')]
    public function show(): Response
    {
        // Add custom logic here
        return $this->render('@RudakDisclaimer/disclaimer/page.html.twig', [
            'custom_var' => 'value',
        ]);
    }
}
```

RGPD Compliance
---------------

[](#rgpd-compliance)

The default template includes:

- ✅ Data controller identification
- ✅ Purpose and legal basis for data processing
- ✅ Data retention periods
- ✅ User rights (access, rectification, erasure, portability, etc.)
- ✅ Cookie policy
- ✅ Right to lodge a complaint with CNIL
- ✅ Security measures
- ✅ Post-mortem directives

**Important**: You must customize the template with your actual information:

- Company/organization details
- Hosting provider information
- Specific data processing activities
- Contact information for GDPR requests

Development
-----------

[](#development)

### Running tests

[](#running-tests)

```
composer test
```

### Static analysis

[](#static-analysis)

```
composer phpstan
```

### Code quality

[](#code-quality)

```
composer rector
```

Upgrade from v1.x
-----------------

[](#upgrade-from-v1x)

This version 2.0 is a complete rewrite with breaking changes:

- **PHP requirement**: Now requires PHP 8.1+
- **Symfony requirement**: Now requires Symfony 5.4+
- **PSR-4 autoloading**: Namespace changed from `Rudak\Bundle\DisclaimerBundle` to `Rudak\DisclaimerBundle`
- **No Doctrine dependency**: Simplified to static templates only
- **Modern routing**: Uses PHP config instead of YAML
- **No admin interface**: Removed legacy admin controller (use template overrides instead)

### Migration steps:

[](#migration-steps)

1. Update your composer.json requirements
2. Update bundle registration in `config/bundles.php`
3. Update route imports to use PHP config
4. Override templates instead of managing data via admin interface
5. Remove any Doctrine entity references

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This bundle is released under the GPL-3.0-or-later license. See the [LICENSE](LICENSE) file for details.

Credits
-------

[](#credits)

- **Original Author**: [Kadur Arnaud](https://github.com/rudak)
- Modernized for Symfony 5.4+ / 6.4+ / 7.0+ and PHP 8.1+

Support
-------

[](#support)

For issues, questions, or suggestions, please use the [GitHub issue tracker](https://github.com/rudak/DisclaimerBundle/issues).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance50

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c53497f169359bdf8ab67f3690af61bd04257cdf7ad6302bd78534978115e7b?d=identicon)[rudak](/maintainers/rudak)

---

Top Contributors

[![rudak](https://avatars.githubusercontent.com/u/604478?v=4)](https://github.com/rudak "rudak (47 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")

### Embed Badge

![Health badge](/badges/rudak-disclaimer-bundle/health.svg)

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

###  Alternatives

[derhansen/sf_banners

Banner-Management Extension based on Extbase and Fluid. Loads banners asynchronously using JavaScript.

1144.5k](/packages/derhansen-sf-banners)[kelunik/retry

A tiny library for retrying failed operations.

1620.1k7](/packages/kelunik-retry)

PHPackages © 2026

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