Download the PHP package druidfi/gdpr-mysqldump without Composer

On this page you can find all versions of the php package druidfi/gdpr-mysqldump. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gdpr-mysqldump

GDPR Dump

A fork of machbarmacher/gdpr-dump

A drop-in replacement for mysqldump that optionally sanitizes DB fields for better GDPR conformity.

It is based on the ifsnop/mysqldump-php library, and can in principle dump any database that PDO supports.

How to use

There are presently two ways of manipulating data, the first is by manipulating the actual SQL queries that are run on the server (given by the gdpr-expressions path), and the second is by replacing column output before the dump is generated (given by the gdpr-replacements option).

The fields to obfuscate are passed via a --gdpr-expressions parameter. Note that we use uid expression to satisfy unique keys.

The same without obfuscation:

Using gdpr-replacements

This uses Faker for most of the column sanitization.

Presently, the tool searches for the "gdpr-replacements" option, either passed as a command line argument, or as part of a MySql options file.

The "gdpr-replacements" option expects a JSON string with the following format

Where formatterType is one of the following

This will replace the given column's value with Faker output.

You can also save replacements mapping to JSON file and use it with --gdpr-replacements-file option.

Use with Drush

See drush-gdpr-dumper

As this mimicks mysqldump, it can be use with drush, backup_migrate and any tool that uses mysqldump. Drush example:

MySqlOptions file

You are able to have your gdpr-expressions/replacement options set in a mysql options file. It is to appear under the [mysqldump] section.

So, for example, you might have /etc/my.cnf with the following content

Status and further development

Currently this is a proof of concept to spark a community process. Especially the --gdpr-expressions option is neither handy to write for humans, nor does it scale well. Here we might need better options.

Contributors notes

TODO

Class \druidfi\GdprDump\Util\Path class is copied from symfony/filesystem:5.4.0 package. When the package drupal/core-dev-pinned will allow symfony/filesystem newer then 5.4 we can remove this class and use symfony/filesystem instead.

Credits

Other information

This project can be found from the Packagist: https://packagist.org/packages/druidfi/gdpr-mysqldump


All versions of gdpr-mysqldump with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
ext-pdo Version *
druidfi/mysqldump-php Version ^1.1.0
fakerphp/faker Version ^1.20
matomo/ini Version ^3.0
symfony/console Version ^4.4.25|^5.0|^6.0|^7.0
symfony/event-dispatcher Version ^4.4.25|^5.0|^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package druidfi/gdpr-mysqldump contains the following files

Loading the files please wait ....