Git Product home page Git Product logo

nucleosgdprbundle's Introduction

NucleosGDPRBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage Type Coverage

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.

nucleosgdprbundle's People

Contributors

core23 avatar dependabot[bot] avatar ensag-dev avatar kodiakhq[bot] avatar nucleos-bot avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nucleosgdprbundle's Issues

Do not store cookies unless confirmed

Feature Request

If you try to store a cookie (exception session cookie or GDPR cookie itself), it should not be persisted unless you confirm the GDPR info.

This can be done intercepting the ResponseEvent and removing all cookies.

It should be possible to define a whitelist where cookies are allowed.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm eslint-loader Unavailable

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

composer
composer.json
  • 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
  • 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
vendor-bin/tools/composer.json
  • friendsofphp/php-cs-fixer ^3.3
  • maglnet/composer-require-checker ^4.0
  • matthiasnoback/symfony-dependency-injection-test ^5.0
  • phpmd/phpmd ^2.10
  • phpstan/extension-installer ^1.0
  • phpstan/phpstan ^1.0
  • phpstan/phpstan-doctrine ^1.0
  • phpstan/phpstan-phpunit ^1.0
  • phpstan/phpstan-strict-rules ^1.0
  • phpstan/phpstan-symfony ^1.0
  • phpunit/phpunit ^10.0
  • psalm/plugin-phpunit ^0.19
  • psalm/plugin-symfony ^5.0
  • symfony/phpunit-bridge ^7.0
  • vimeo/psalm ^5.0
github-actions
.github/workflows/assets.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/automatic-release.yml
.github/workflows/continuous-integration.yml
npm
package.json
  • @babel/core ^7.20.12
  • @babel/preset-env ^7.20.2
  • @size-limit/esbuild ^11.1.4
  • @size-limit/preset-small-lib ^11.1.4
  • @symfony/webpack-encore ^4.2.0
  • @babel/eslint-parser ^7.11.0
  • babel-loader ^9.0.0
  • eslint ^9.0.0
  • eslint-config-airbnb ^19.0.4
  • eslint-loader ^4.0.0
  • eslint-plugin-import ^2.27.5
  • eslint-watch ^8.0.0
  • sass ^1.57.1
  • sass-loader ^16.0.0
  • size-limit ^11.1.4
  • webpack ^5.72
  • webpack-cli ^5.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

adding this package leads to error

Environment

Packages

symfony 4.4 application

$ composer show --latest
---snip---
sonata-project/block-bundle             4.7.0            4.7.0            Symfony SonataBlockBundle
sonata-project/cache                    2.2.0            2.2.0            Cache library
sonata-project/doctrine-extensions      1.14.0           1.14.0           Doctrine2 behavioral extensions
sonata-project/form-extensions          1.11.0           1.11.0           Symfony form extensions
sonata-project/twig-extensions          1.9.0            1.9.0            Sonata twig extensions
---snip---

PHP version

$ php -v
7.4

Subject

adding this package to me previously working project leads to an error (directly after installing it with composer, while cache:clear is called).

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
!!
!!     The service "sonata.twig.template_extension" has a dependency on a non-existent service "sonata.doctrine.model.adapter.chain".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

also tried to completly delete the cache folder.

can't include GdprPopup.js

Question

Hello, I can't figure out how to include js file in my symfony 4.4 project. Could you tell me which part of Webpack Encore should I look into?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.