php-anonymizer / anonymizer-laravel
Laravel integration for PHP Anonymizer
Package info
github.com/toniliesche/php-anonymizer-laravel
pkg:composer/php-anonymizer/anonymizer-laravel
Requires
- php: ^8.5
- illuminate/support: ^13.0
- php-anonymizer/anonymizer: ^2.0
- psr/log: ^3.0.2
- symfony/yaml: ^7.4 || ^8.1.9
- webmozart/assert: ^2.5
Requires (Dev)
- laravel/framework: ^13.38
- orchestra/testbench-core: ^11.6
Suggests
- php-anonymizer/anonymizer-faker: Enable Faker replacement strategies
- php-anonymizer/anonymizer-personas: Enable fixed European persona strategies
- php-anonymizer/anonymizer-pseudonymization: Enable keyed deterministic pseudonymisation
- php-anonymizer/anonymizer-symfony-serializer: Enable object anonymization through an application-owned Symfony Serializer
Provides
None
Conflicts
None
Replaces
None
README
Project Status
Project Info
Repo Status
License
This project is released under the MIT license.
See the LICENSE for more information.
Install the package in a Laravel 13 application:
composer require php-anonymizer/anonymizer-laravel
Laravel auto-discovers the service provider and publishes configuration with:
php artisan vendor:publish --tag=anonymizer-config
Configured profiles are composed first, followed by services tagged in Laravel’s
registration order with anonymizer.profile_provider,
anonymizer.replacement_strategy, anonymizer.payload_codec, or
anonymizer.value_transformation.
Profile providers must be registered explicitly by the application or an installed package. They return immutable profile definitions; providers do not expose raw source data, secrets, or replacement values, and profiles are not overridden or inherited.
The package binds the core anonymization services, profile inspection, audit,
batch, document, and NDJSON interfaces. Configure execution limits and optional
audit logging under anonymizer.limits and anonymizer.audit.
Object anonymization is opt-in and requires
php-anonymizer/anonymizer-symfony-serializer plus an application-owned
Symfony Serializer implementing normalization and denormalization. Enable
anonymizer.serializer.enabled and set anonymizer.serializer.service to its
container ID, or bind Symfony\Component\Serializer\SerializerInterface.
The integration never constructs a Serializer and does not require the Symfony
Bundle. See the package-local usage guide for optional package
installation and configuration.
The package has no facade and does not provide Eloquent, middleware, response, or automatic model-to-profile integration.
See the package-local usage guide.