PHPackages                             linkorb/anonymizer - 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. linkorb/anonymizer

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

linkorb/anonymizer
==================

Data anonymizers

v2.0.0(1y ago)31912[1 issues](https://github.com/linkorb/anonymizer/issues)MITPHPPHP &gt;=8.2

Since Sep 1Pushed 1y ago3 watchersCompare

[ Source](https://github.com/linkorb/anonymizer)[ Packagist](https://packagist.org/packages/linkorb/anonymizer)[ Docs](https://github.com/linkorb/anonymizer)[ RSS](/packages/linkorb-anonymizer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Anonymizer
==========

[](#anonymizer)

Anonymizer is a toolkit to help you to automate production data anonymization for test environments and compliancy.

Features:
---------

[](#features)

- Scramble data by column
- Maintains referential integrity
- Consistent output state on multiple runs of same source data
- Truncate entire tables
- Drop tables or individual columns
- Store configuration (DSN + Filename) in a .env file

Usage
-----

[](#usage)

1. Scan your application's database schema and decide which columns contain sensitive information. For example: `user.email` or `request.ip`, etc.
2. Create a configuration file (example below) for your application that lists all the sensitive columns with a method for anonymization.
3. Run anonymizer on your test database:

    vendor/bin/anonymizer

anonymizer.yml format
---------------------

[](#anonymizeryml-format)

This file defines which columns needs to be anonymized, and using which method. Additionally you truncate or drop entire tables or columns.

Here's an example:

```
---
columns:
    user.email:
      method: faker
      arguments:
        formatter: email
      cascades:
        - user_email.address
        - comment.email

    request.ip:
      method: faker
      arguments:
        formatter: ipv5
      cascades:
        - exception.ip
truncate:
  - table1
  - table2

drop:
  - user.ip
  - request.agent
  - tmp*
  - *.password
```

All columns are listed in `tableName.columnName` format. For each column a `method` is defined, with some optional `arguments`. Most common is the `faker` method, that takes a `formatter` as an argument (i.e. email, userName, city, ipv4, etc - see the faker docs for more)

If you have any columns in other tables that reference this column, you can list them in the `cascades` key (optional). This will ensure that the external columns are updated with the same new value so their references still work.

Wildcards
---------

[](#wildcards)

You can use wildcards (\*, ?) in tablenames of the `drop` list.

Configuration
-------------

[](#configuration)

You can use the environment (or a .env file) to pass ANONYMIZER\_DSN (or PDO) and ANONYMIZER\_FILENAME values to the `anonymizer run` command. These values will be used to connect to the database, and read the specified configuration yaml file.

Optionally: configure `ANONYMIZER_CONFIG_PATH` to point to a directory of `.conf` files containing database connection details. This will be registered as an INI Backend to the Connector service to resolve db connections from config files.

About the "randomly" generated data
-----------------------------------

[](#about-the-randomly-generated-data)

- The faker is initialized with the same seed every run (0). This ensures that multiple runs of anonymizer on the same source data result in the same anonymized data.
- The faker method ensures all generated values are unique within a single table. This prevents problems with references etc
- If you list cascades that contain values that are not defined in the source table, they will be updated to NULL. This prevents sensitive data lingering around in cascades accidentally. In a properly integrity-checked database this scenario would not happen.

Verbosity / schema
------------------

[](#verbosity--schema)

anonymizer analyzes the schema (tablenames + columnnames) before running. This information is used by the wildcard functionality. You can run anonymizer with `-v` to increase the verbosity to view this data. This can help you to verify if you're not seeing any tables or columns that should be dropped.

License
-------

[](#license)

MIT. Please refer to the [license file](LICENSE) for details.

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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.

###  Release Activity

Cadence

Every ~700 days

Total

5

Last Release

374d ago

Major Versions

v1.2.1 → v2.0.02025-05-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

[![joostfaassen](https://avatars.githubusercontent.com/u/411113?v=4)](https://github.com/joostfaassen "joostfaassen (18 commits)")[![mhitza](https://avatars.githubusercontent.com/u/273079?v=4)](https://github.com/mhitza "mhitza (1 commits)")[![prajapati-kaushik](https://avatars.githubusercontent.com/u/10140681?v=4)](https://github.com/prajapati-kaushik "prajapati-kaushik (1 commits)")

---

Tags

datalinkorbanonymizer

### Embed Badge

![Health badge](/badges/linkorb-anonymizer/health.svg)

```
[![Health](https://phpackages.com/badges/linkorb-anonymizer/health.svg)](https://phpackages.com/packages/linkorb-anonymizer)
```

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[altis/local-server

Local Server module for Altis

18208.4k2](/packages/altis-local-server)

PHPackages © 2026

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