nucleos / gdpr-bundle
This bundle provides a GDPR conform cookie information for symfony applications.
Fund package maintenance!
core23
Opencollective
Ko-Fi
Other
Installs: 10 693
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 3
Open Issues: 6
Type:symfony-bundle
Requires
- php: ^8.1
- sonata-project/block-bundle: ^4.21 || ^5.0
- sonata-project/form-extensions: ^1.19 || ^2.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/expression-language: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/options-resolver: ^6.4 || ^7.0
- symfony/twig-bundle: ^6.4 || ^7.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.0.1
- symfony/browser-kit: ^6.4 || ^7.0
- symfony/console: ^6.4 || ^7.0
- symfony/yaml: ^6.4 || ^7.0
Suggests
- nucleos/shariff-bundle: If you need a GDPR conform social media widget integration
- 3.0.x-dev
- 2.8.x-dev
- 2.8.0
- 2.7.x-dev
- 2.7.0
- 2.6.x-dev
- 2.6.0
- 2.5.x-dev
- 2.5.0
- 2.4.x-dev
- 2.4.0
- 2.3.x-dev
- 2.3.0
- 2.2.x-dev
- 2.2.0
- 2.1.0
- 2.0.0
- 1.5.0
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.3.0
- 0.2.0
- 0.1.1
- 0.1.0
- dev-renovate/symfony-webpack-encore-5.x
- dev-dependabot/npm_and_yarn/express-4.21.0
- dev-dependabot/npm_and_yarn/micromatch-4.0.8
- dev-2.8.x-merge-up-into-3.0.x_Z81Oyk71
- dev-renovate/matthiasnoback-symfony-dependency-injection-test-6.x
- dev-renovate/phpunit-phpunit-11.x
- dev-readme-badge
This package is auto-updated.
Last update: 2024-09-30 00:50:47 UTC
README
This bundle provides a GDPR conform cookie information for symfony applications.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require nucleos/gdpr-bundle
Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php
file of your project:
// config/bundles.php return [ // ... Nucleos\NucleosGDPRBundle\NucleosGDPRBundle::class => ['all' => true], ];
Block cookies
By default all cookies are kept, also the cookie consent was not set. To block all domain cookies, you can set the following config.
# config/packages/nucleos_gdpr.yaml nucleos_gdpr: block_cookies: null
You can define a list of cookies that are kept:
# config/packages/nucleos_gdpr.yaml nucleos_gdpr: block_cookies: keep: - PHPSESSID - ADMIN_.*
Google FLoC (Federated Learning of Cohorts)
By default a Permissions-Policy
header is added to every response to respect user privacy. You can enable Google FLoC tracking via the following configuration:
# config/packages/nucleos_gdpr.yaml nucleos_gdpr: privacy: google_floc: true
Assets
It is recommended to use webpack / webpack-encore
to include the GdprPopup.js
and GdprPopup.css
file in your page. These files are located in the assets
folder.
Usage
{# template.twig #} {{ sonata_block_render({ 'type': 'nucleos_gdpr.block.information' }, { 'url': 'https://example.com/gdpr', 'text': 'Example text' // optional }) }}
License
This bundle is under the MIT license.