Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using longitude + latitude faker formatter #4

Open
r-ichard opened this issue Dec 7, 2020 · 2 comments
Open

Error when using longitude + latitude faker formatter #4

r-ichard opened this issue Dec 7, 2020 · 2 comments

Comments

@r-ichard
Copy link

r-ichard commented Dec 7, 2020

When I use longitude / latitude fields since it can return negative floats so Anonymizer throw an error :

In Anonymizer.php line 46

  [WebnetFr\DatabaseAnonymizer\Exception\InvalidAnonymousValueException]  
  Generated value must be null or string  
@sload
Copy link
Collaborator

sload commented Dec 9, 2020

Hello @r-ichard,

Could you give me more elements so that I can reproduce the error ?

@r-ichard
Copy link
Author

Hello,

Sure ! Here is my config file :

webnet_fr_database_anonymizer:
    tables:
        project:
            fields:
                name:
                    generator: faker
                    formatter: word
                longitude:
                    generator: faker
                    formatter: longitude
                latitude:
                    generator: faker
                    formatter: latitude
                address:
                    generator: faker
                    formatter: streetAddress
                zipCode:
                    generator: faker
                    formatter: postcode
                city:
                    generator: faker
                    formatter: city
                address_typed:
                    generator: faker
                    formatter: streetAddress

If I dump $anonValue in Anonymizer on line 46 i get : 149.299745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants