jbcr / SyliusGDPRPlugin

Make your Sylius project GDPR compliant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License CI Version Total Downloads

Sylius GDPR Plugin

Capture

Features

  • Anonymize customer with the GDPR section in the admin customer show.
  • Export customer data with the GDPR section in the admin customer show.

Click to see the anonymization configuration.

Click to see the export data configuration.

  • Anonymize any entity with command for example :
php bin/console synolia:gdpr:anonymize --entity='Sylius\Component\Core\Model\Customer' --id=1 

Use --help to get more informations

Events

  • Synolia\SyliusGDPRPlugin\Event\BeforeAnonymize
  • Synolia\SyliusGDPRPlugin\Event\AfterAnonymize
  • Synolia\SyliusGDPRPlugin\Event\BeforeCustomerAnonymize
  • Synolia\SyliusGDPRPlugin\Event\AfterCustomerAnonymize
  • Synolia\SyliusGDPRPlugin\Event\BeforeExportCustomerData

Requirements

Version
PHP 7.3, 7.4, 8.0
Sylius 1.9, 1.10

Installation

  1. Add the bundle and dependencies in your composer.json :

    composer require synolia/sylius-gdpr-plugin --no-scripts
  2. Enable the plugin in your config/bundles.php file by add

    Synolia\SyliusGDPRPlugin\SynoliaSyliusGDPRPlugin::class => ['all' => true],
  3. Import required config in your config/packages/_sylius.yaml file:

    imports:
        - { resource: "@SynoliaSyliusGDPRPlugin/Resources/config/app/config.yaml" }
  4. Import routing in your config/routes.yaml file:

    synolia_gdpr:
        resource: "@SynoliaSyliusGDPRPlugin/Resources/config/routes/admin/customer.yaml"
        prefix: '/%sylius_admin.path_name%'
  5. Clear cache

    php bin/console cache:clear

Add anonymization configuration

synolia_sylius_gdpr:
   disable_default_mappings: false # False by default
   anonymization:
       mappings:
           paths:
               - # Your\Paths\To\Mappings\Directory

Example of configuration

Sylius\Component\Core\Model\Address: # Your class path
  properties:
     firstName:
        faker: text # let's see => https://fakerphp.github.io/formatters/
        args: [20] # The associated faker arguments
        prefix: 'anonymized-'
     lastName:
        value: 'Fake lastName'
        prefix: 'anonymized-'

Value can be null, an array, an int and a string

Development

See How to contribute.

License

This library is under the EUPL-1.2 license.

Credits

Developed by Synolia.

About

Make your Sylius project GDPR compliant.

License:European Union Public License 1.2


Languages

Language:PHP 95.5%Language:Makefile 3.3%Language:Twig 1.0%Language:JavaScript 0.2%