PHPackages                             ipunkt/data-transformer - 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. ipunkt/data-transformer

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ipunkt/data-transformer
=======================

Filling staging database with fake data filling of GDPR related data.

1874PHP

Since Nov 22Pushed 6y ago2 watchersCompare

[ Source](https://github.com/ipunkt/data-transformer)[ Packagist](https://packagist.org/packages/ipunkt/data-transformer)[ RSS](/packages/ipunkt-data-transformer/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Data-Transformer Package for Laravel
====================================

[](#data-transformer-package-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/338ed41d1b1a3141ca4743edafef0ffc839f26060a64497c31fbf58533fe10a6/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f646174612d7472616e73666f726d65722f762f737461626c652e737667)](https://packagist.org/packages/ipunkt/data-transformer)[![Latest Unstable Version](https://camo.githubusercontent.com/26167f338b3724531d18654f2e49177b6df3ef03d6c3c9afe5c26cbcdc91de1e/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f646174612d7472616e73666f726d65722f762f756e737461626c652e737667)](https://packagist.org/packages/ipunkt/data-transformer)[![License](https://camo.githubusercontent.com/412338b3812552e9688291bd585ae79820775ec655d991a033008131c04277bf/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f646174612d7472616e73666f726d65722f6c6963656e73652e737667)](https://packagist.org/packages/ipunkt/data-transformer)[![Total Downloads](https://camo.githubusercontent.com/60c477929338d648dd71cb193a342916a6cf4a755c18519103aac16f655ba84e/68747470733a2f2f706f7365722e707567782e6f72672f6970756e6b742f646174612d7472616e73666f726d65722f646f776e6c6f6164732e737667)](https://packagist.org/packages/ipunkt/data-transformer)

Data will be manipulated from production (source) to staging (target). This tool will be definitely needed when you dislike to work with real data from your users.

The main job of this package to fake data that GDPR relevant is. Take a look at the following List:

- Name
- Email Address
- Phone number
- Credit cards
- Date of birth
- Place of birth
- Identification number
- Online data
    - IP address
    - Location data (GPS)
- Images
- License plate
- Health data

This list must be considered, when you try to work with real Data, therefore GDPR relevant data must be transformed. The Rest will be then `1:1` taken.

### Installation - Quick-start

[](#installation---quick-start)

`composer require ipunkt/data-transformer`

**Or**

Alternative you can add these lines into your composer file then `composer install` in console command

```
"require": {
	"ipunkt/data-transformer": "^1.0"
}

```

### Configuration

[](#configuration)

I assume that you already have a connection in your `database.php`. like the following

```
'mysql' => [
       'driver' => 'mysql',
       'host' => env('DB_HOST', '127.0.0.1'),
       'port' => env('DB_PORT', '3306'),
       'database' => env('DB_DATABASE', 'forge'),
       'username' => env('DB_USERNAME', 'forge'),
       'password' => env('DB_PASSWORD', ''),
       'unix_socket' => env('DB_SOCKET', ''),
       'charset' => 'utf8mb4',
       'collation' => 'utf8mb4_unicode_ci',
       'prefix' => '',
       'prefix_indexes' => true,
       'strict' => true,
       'engine' => null,
   ],

```

You will be asked about the connection which is for source, when you run later on both of commands. `php artisan transform:dump` and `php artisan transfrom:data`

- run this command: `php artisan vendor:publish` then choose `Ipunkt\DataTransformer\DataTransformerServiceProvider`
- find your Config File in `config/data-transformer.php`
- edit your Config for instance: `name` to `username` and/or `fakeName` to `value` or vice versa
- run `php artisan transform:dump {host} {db} {username} {password}` your standard config File will be `data-transformer.json`you'll find it in the root of your Application. An Example `php artisan transform:dump 000.000.0.000 transformer root pw`
- `000.000.0.000` --&gt; `IP address` as `host`
- `transformer` --&gt; `DB_NAME`
- `root` --&gt; `USERNAME`
- `pw` --&gt; `PASSWORD`in `data-transformer.json` you'll find something like this:

```
{
 "users": {
   "id": "value",
   "name": "fakeName",
   "email": "fakeEmail",
   "action_on_redeem_json": "value",
   "action_on_expire_json": "value",
   "created_at": "value",
   "updated_at": "value"
 }
}

```

Here's the all list with data that could be transformed:

- `name` =&gt; `fakeName` via faker `$this->faker->name`
- `email` =&gt; `fakeEmail` via faker `$this->faker->safeEmail`
- `place_of_birth` =&gt; `fakePlaceOfBirth` via faker `$this->faker->country`
- `data_health` =&gt; `fakeDataHealth` via faker `$this->faker->randomDigit`
- `id_number` =&gt; `fakeID` via faker `$this->faker->uuid`
- `phone_number` =&gt; `fakePhoneNumber` via faker `$this->faker->phoneNumber`
- `credit` =&gt; `fakeCredit` via faker `$this->faker->bankAccountNumber`
- `license_plate` =&gt; `fakeLicensePlate` via faker `$this->faker->randomLetter`
- `image` =&gt; `fakeImage` via faker `$this->faker->image`
- `ip_address` =&gt; `fakeIPAddress` via faker `$this->faker->localIpv4`
- `data_location` =&gt; `fakeDataLocation` via faker `$this->faker->latitude`
- `address` =&gt; `fakeAddress` via faker `$this->faker->address`
- `date_of_birth` =&gt; `fakeDateOfBirth` via faker `$this->faker->dateTime()->format('Y-m-d')`

Here you can decide whether the Name must be transformed or not, for instances. If you let the Name without any change then it will be faked. If you don't want to transform Name, then you have to replace the `fakeName` with `value`. That's it.

The second and last Step: run the second command `php artisan transform: {host} {db} {username} {password}` (like `transform:dump` command)
`{--target=mysql}`

you have to change the `mysql` to whatever it is in your `database.php`

If you want to disable foreign keys that tables has/have, add the following flag `foreign-keys-checks`at the end of the second Command: `php artisan transform:dump {source} {target} --foreign-keys-checks=no`

**Note:**
if you changed your config file, then it is required otherwise you don't need to do anything else.

And you're Done!

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/4946056?v=4)[Robert Kummer](/maintainers/rokde)[@rokde](https://github.com/rokde)

---

Top Contributors

[![Hussein-Khalil](https://avatars.githubusercontent.com/u/43755547?v=4)](https://github.com/Hussein-Khalil "Hussein-Khalil (14 commits)")

---

Tags

data-transformerfakergdprlaravellaravel-package

### Embed Badge

![Health badge](/badges/ipunkt-data-transformer/health.svg)

```
[![Health](https://phpackages.com/badges/ipunkt-data-transformer/health.svg)](https://phpackages.com/packages/ipunkt-data-transformer)
```

###  Alternatives

[barrelstrength/sprout-seo

1133.8k1](/packages/barrelstrength-sprout-seo)

PHPackages © 2026

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