Download the PHP package oihana/php-masking without Composer
On this page you can find all versions of the php package oihana/php-masking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oihana/php-masking
More information about oihana/php-masking
Files in oihana/php-masking
Package php-masking
Short Description Lightweight, framework-agnostic PHP data-masking toolkit: anonymize and redact document fields with composable maskers (email, phone, credit card, dates, ZIP, decimals, X-ify…) for dumps, fixtures and test data.
License MPL-2.0
Homepage https://github.com/BcommeBois/oihana-php-masking
Informations about the package php-masking
Oihana PHP - Masking

A lightweight, framework-agnostic PHP toolkit to anonymize and redact the fields of your documents.
📚 Documentation
User guides (FR + EN), with narrative explanations, examples and recipes:
| 🇬🇧 English documentation | 🇫🇷 Documentation française |
| Getting started, the masking rules, the maskers catalogue, testing. | Démarrage, les règles de masquage, le catalogue des maskers, tests. |
Auto-generated API reference (phpDocumentor):
👉 https://bcommebois.github.io/oihana-php-masking
🚀 Features
- 🎭 10 composable maskers —
email,phone,creditCard(Luhn-valid),datetime,decimal,integer,zip,random,randomString,xifyFront. - 🗂️ Document engine — apply a list of path-based rules to a whole document, descending into nested objects and arrays.
- 🧭 Expressive path DSL — target a leaf by name, exact dotted path, name-at-any-depth (
.name), wildcard (*) or a backtick-quoted literal key. - 🛡️ Identity-safe, your way — pass the attributes to protect from masking; fully data-store agnostic (no field name is hardcoded).
- 🧱 Standalone functions, no framework — autoloaded via
composer.autoload.files, strongly-typed enums instead of magic strings. - 🧪 100% unit-tested.
💡 Designed to be lightweight, testable and compatible with any PHP 8.4+ project — dumps, fixtures, test data, GDPR/PII redaction.
📦 Installation
Requires PHP 8.4+
Install via Composer:
⚡ Quick start
Need a single value rather than a whole document? Use the dispatcher:
✅ Tests & coverage
Run the full unit-test suite (PHPUnit, strict mode):
Run a single test case:
Measure coverage (requires Xdebug or PCOV):
The suite covers 100% of lines. For the testing philosophy and the
@codeCoverageIgnore policy, see the detailed guide:
wiki/fr/testing.md.
🧾 License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
👤 About the author
- Author : Marc ALCARAZ (aka eKameleon)
- Mail : [email protected]
- Website : http://www.ooop.fr
🛠️ Generate the documentation
We use phpDocumentor to generate the API reference into the ./docs folder:
🔗 Related packages
oihana/php-reflect– reflection and hydration utilities (provides theConstantsTraitused by the enums):https://github.com/BcommeBois/oihana-php-reflectoihana/php-arango– ArangoDB toolkit; the original home of this masking engine, now consumingoihana/php-masking:https://github.com/BcommeBois/oihana-php-arango