Repository navigation
What's changed
Seeded output is now fully reproducible
Seeding Faker now reproduces the output exactly, including where inline decorations (bold, italic, code, links) land. Before this release, decoration positions used random_int(), which ignored the seed. (#8)
fake()->seed(1234);
markdown_faker()->docsPage()->render(); // identical on every runBring your own Faker generator
make(), the helpers and a new fluent withFaker() method accept a Faker\Generator. You can use this, for example, to add your own providers:
MarkdownFaker::make($faker)->article()->render();
markdown_faker($faker)->article()->render();
MarkdownFaker::make()->withFaker($faker)->article()->render();Existing calls are unaffected.
Notes
- Faker's
seed()seeds PHP's process-wide random generator, so seeding any Faker instance affects all of them. Seed immediately before generating the content you want to reproduce. - Generated prose comes from Faker's
Loremprovider, which no locale overrides. A locale-specific generator still produces Latin text; to change the prose, add a provider that extendsFaker\Provider\Loremwith your own$wordList(see the README for an example). Overriding individual methods such asparagraph()isn't enough, becauseLoremcalls its own methods internally.
Full Changelog: v1.1.0...v1.2.0