gdpr-dump
gdpr-dump copied to clipboard
Capability to add or override faker providers
What is the problem?
\Faker\Provider\Internet::userName
could easily return same value (\Faker\Provider\Internet::$userNameFormats
are too weak) while username
should be unique for systems with login by username
The faker documentation explains how to add our own providers, but the \Smile\GdprDump\Faker\FakerService
does not seem to manage this override.
Alternatives considered Get some faker config to permit overrides
Hi @bertrand-leroux !
The faker library was added to the project so that existing Faker formatters can be used. For custom formatters, you can create gdpr converters. The documentation explains how to build a phar file that includes custom converters.
I don't think it's possible to override a Faker formatter anyway. Adding a new provider with the "username" function does not seem to work.