gdpr-dump icon indicating copy to clipboard operation
gdpr-dump copied to clipboard

Capability to add or override faker providers

Open bertrand-leroux opened this issue 3 years ago • 1 comments

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

bertrand-leroux avatar Jul 06 '21 16:07 bertrand-leroux

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.

guvra avatar Jul 12 '21 08:07 guvra