Download the PHP package bambamboole/extended-faker without Composer
On this page you can find all versions of the php package bambamboole/extended-faker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bambamboole/extended-faker
More information about bambamboole/extended-faker
Files in bambamboole/extended-faker
Package extended-faker
Short Description A FakerPHP extension providing realistic product, category, blog post, and fixture-backed page data across locales.
License MIT
Homepage https://github.com/bambamboole/extended-faker
Informations about the package extended-faker
Extended Faker
PHP package extending FakerPHP/Faker with realistic product, category, blog post, and page data. Products are generated from compositional templates (effectively unlimited, trademark-free). Provides 19+ categories, 12 fixture-backed pages, and dynamically generates 1000+ unique blog posts with localized content across English (en_US) and German (de_DE).
Features
- Cross-language consistency: Same identifiers across locales with localized content
- Multiple data types: Products, categories, blog posts, and pages
- Dynamic blog post generation: Compositional template system generates 1000+ unique blog posts
- Markdown blog posts: Professional content with headings, code blocks, and rich formatting
- Fixture-backed pages: Named pages composed of structured Content blocks, renderable to Markdown or WordPress block markup
- Realistic data: Synthetic, trademark-free product names, descriptions, categories, and dynamically composed articles
- Deterministic generation: Same seed produces same blog post for reproducible testing
- Extensible: Easy to add new data via JSON template files
Installation
Usage
Products
Products are generated deterministically from compositional templates, so
$faker->unique()->product() yields effectively unlimited unique products
(synthetic, trademark-free names like "Voltari Pulse 7 Pro 256GB Graphite").
Categories
Blog Posts
Pages
Using ExtendedFaker Helper
For convenience, use the ExtendedFaker::extend() method to register all providers at once:
Available Methods
Product Provider
productName(?string $identifier = null): stringproductDescription(?string $identifier = null): stringproductCategory(?string $identifier = null): stringproduct(?string $identifier = null): ProductDtogenerateProduct(int $seed, ?string $category = null, ?string $locale = null): ProductDtoproductBySku(string $sku, ?string $locale = null): ProductDtogetProductInLocale(string $sku, string $locale): ProductDto
Category Provider
categoryName(?string $identifier = null): stringcategory(?string $identifier = null): array
BlogPost Provider
blogPostTitle(?string $identifier = null): stringblogPostContent(?string $identifier = null): stringblogPostExcerpt(?string $identifier = null): stringblogPostCategory(?string $identifier = null): stringblogPostTags(?string $identifier = null): arrayblogPostAuthor(?string $identifier = null): stringblogPostReadingTime(?string $identifier = null): intblogPost(?string $identifier = null): BlogPostDtoblogPostBySlug(string $slug, ?string $locale = null): BlogPostDtogetBlogPostSlug(string $title): stringgetBlogPostInLocale(string $slug, string $locale): BlogPostDto
Page Provider
pageTitle(string|PageType|null $identifier = null): stringpageContent(string|PageType|null $identifier = null): stringpageBlockContent(string|PageType|null $identifier = null, ?WordPressBlockOptions $options = null): stringpageExcerpt(string|PageType|null $identifier = null): stringpageTemplate(string|PageType|null $identifier = null): stringpageSeo(string|PageType|null $identifier = null): arraypage(string|PageType|null $identifier = null): PageDtopageByType(PageType $page, ?string $locale = null): PageDtopageBySlug(string $slug, ?string $locale = null): PageDtogetPageSlug(string $title): stringgetPageInLocale(string $slug, string $locale): PageDto
Data Structure
Categories and pages are stored as JSON files. Products and blog posts are dynamically generated from composable templates:
Blog Post Generation
Blog posts are dynamically generated using a compositional template system that mixes and matches components:
- 1000+ unique combinations from template patterns
- Deterministic generation: Same seed always produces the same post
- Category-specific content: Technology, Business, Travel, Lifestyle
- Automatic slug generation from titles
- Reading time calculation based on word count (200 words/minute)
- 3-5 minute reads: Short, focused blog posts (150-350 words)
Available Categories: Technology, Business, Travel, Lifestyle
Each generated post includes:
- Unique title and slug
- Category-appropriate introduction
- 4-5 content sections
- Conclusion
- 3-5 relevant tags
- Random author name
- Published date (2023-2024)
- Calculated reading time
- Optional code examples (technology posts)
Fixture Images
Every product, category, and page exposes a small, copyright-safe comic image
(bold-outline SVG rasterized to WebP, committed under resources/images/).
Each generated product gets a committed WebP matching its category and colour: every
category's comic motif is rendered in each palette, and a product points to the palette
that matches its colour (so products sharing a category and colour share an image). The
ImageDto exposes the relative path plus the resolved absolute path and file metadata. The
shipped package only reads the committed WebP files. To regenerate the set, run
npm install && composer images:build — rasterization uses Node + sharp.
See the creating-fixture-images skill for the motif system.
Requirements
- PHP 8.3+
- fakerphp/faker ^1.24
- league/commonmark ^2.7
- symfony/yaml ^7.3
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Manuel Christlieb
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of extended-faker with dependencies
fakerphp/faker Version ^1.24
league/commonmark Version ^2.7
davidbadura/faker-markdown-generator Version ^1.1