If the faker is seeded, the date/datetime functions can return inconsistent values depending on the date the current machine is running on.
this means, running a seeded the fake()->date will return different results every day.
this behaviour can be fixed if you set the $max parameter: fake()->date('Y-m-d', '2024-01-01')
however, i think a seeded faker should take care of this by its own
That is your opinion. As mentioned in the docs it works like expected when you provide the max value. If not the current date is used if i recall correctly
Summary
If the faker is seeded, the date/datetime functions can return inconsistent values depending on the date the current machine is running on.
this means, running a seeded the fake()->date will return different results every day.
this behaviour can be fixed if you set the $max parameter: fake()->date('Y-m-d', '2024-01-01') however, i think a seeded faker should take care of this by its own
Versions
fakerphp/faker
Self-enclosed code snippet for reproduction
Expected output
Actual output