webnet-fr / database-anonymizer

CLI tool an PHP library to anonymize data in various databases
MIT License
33 stars 18 forks source link

Generated value must be null or string #6

Open 0x346e3730 opened 3 years ago

0x346e3730 commented 3 years ago

Hello,

When using the anonymizer with the bundle, I encountered this error. It comes from WebnetFr\DatabaseAnonymizer\Anonymizer line 53.

I don't understand why there is this constraint :

if (null !== $anonValue && !\is_string($anonValue)) {
    throw new InvalidAnonymousValueException('Generated value must be null or string');
}

I had this error when using numbers : why would numbers be forbidden/invalid ? I can't think of a use case.

Thank's.