Skip to content

[Bug] Unique faker email doesn't work #158

Description

@felabrecque

Problem to solve

Faking email address must be unique in the user tables.

Proposed solution

Here is the faker doc about that: https://fakerphp.org/#modifiers

I received this error message in the jsonl file:

{"ts":"2026-07-17T20:10:31.221Z","level":"warning","event":"row_skipped","table":"users","chunk_offset":0,"row_index":426,"pk":{"id":443},"error":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'kfritsch@example.com' for key 'users_email_unique' ...

So... faker()->unique()->safeEmail() didn't work in your code.

The problem might be case sensitivity because my "email" column is case insensitive so 'A@example.com' and 'a@example.com' are treated as the same email.

I cannot use mask, value or redacted so I don't really know which option to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions