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

Improve reproducibility with faker #793

Open
nikophil opened this issue Jan 19, 2025 · 0 comments
Open

Improve reproducibility with faker #793

nikophil opened this issue Jan 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@nikophil
Copy link
Member

nikophil commented Jan 19, 2025

When using Faker, I prefer to have full randomness from one execution to another (ie: not specifying a seed)

but, when a test fails, I would like to reproduce the problem, with the exact same data, which is not actually possible, because it used an unknown seed.

My proposal would be to always give a random seed to faker, and then display it right after phpunit's execution (thanks to our PHPUnit extension). And being able to set the seed thanks to an environment variable.

I think this would also mean to deprecate zenstruck_foudry.faker.seed configuration.

@nikophil nikophil added the enhancement New feature or request label Jan 19, 2025
@nikophil nikophil changed the title Improve reproductability with faker Improve reproducibility with faker Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant