
English | العربية | বাংলা | Bosanski | Deutsch | Español | Français | हिन्दी | Italiano | 日本語 | 한국어 | मराठी | Português | Русский | Kiswahili | தமிழ் | తెలుగు | Türkçe | اردو | Tiếng Việt | 中文
Faker Storage is a high-performance PHP package designed to generate and store large volumes of fake data files efficiently. Built with concurrency in mind, it leverages Swoole or PCNTL to generate thousands of files in parallel, making it ideal for load testing, development environments, and storage system benchmarking.
The package provides a fluent API for generating various file types including images (PNG, JPG, GIF, BMP, WEBP, AVIF), text files, CSV files, binary data, and RFC822-compliant emails. Each generator produces deterministic output when seeded, ensuring reproducible test data across environments.
- High-Performance Concurrency: Automatic selection between Swoole (coroutines) and PCNTL (process forking) for parallel file generation
- Multiple File Generators: Built-in support for images, text, CSV, binary, and email files
- Deterministic Output: Seed-based generation ensures reproducible results
- Flexible Storage: Works with any League Flysystem adapter (local, S3, etc.)
- Customizable File Naming: Closure-based name generation with full control
- Image Support: Multiple formats with configurable dimensions and compression
- Email Generation: RFC822-compliant emails with attachments and MIME support
use DefectiveCode\Faker\Faker;
use League\Flysystem\Filesystem;
use DefectiveCode\Faker\Generators\Png;
use League\Flysystem\Local\LocalFilesystemAdapter;
// Generate 1000 PNG images with 10 concurrent workers
Faker::make(Png::class)
->width(800, 1920)
->height(600, 1080)
->toDisk(new Filesystem(new LocalFilesystemAdapter('/path/to/storage')))
->basePath('images')
->count(1000)
->concurrency(10)
->seed(42)
->generate();
// Generate CSV files
use DefectiveCode\Faker\Generators\Csv;
Faker::make(Csv::class)
->columns(5, 10)
->rows(100, 500)
->delimiter(',')
->toDisk(new Filesystem(new LocalFilesystemAdapter('/path/to/storage')))
->count(50)
->generate();
// Generate emails with attachments
use DefectiveCode\Faker\Generators\Email;
Faker::make(Email::class)
->paragraphs(3, 5)
->sentences(2, 4)
->withAttachment(Png::class, 1, 3)
->toDisk(new Filesystem(new LocalFilesystemAdapter('/path/to/storage')))
->count(100)
->generate();You may read the documentation on our website.
Thanks for choosing our open source package! Please take a moment to check out these support guidelines. They'll help you get the most out of our project.
Our open-source project is fueled by our awesome community. If you have questions or need assistance, StackOverflow and other online resources are your best bets.
The reality of managing an open-source project means we can't address every reported bug or feature request immediately. We prioritize issues in the following order:
Bugs that impact our paid products will always be our top priority. In some cases, we may only address bugs that affect us directly.
If you've identified a bug and have a solution, please submit a pull request. After issues affecting our products, we give the next highest priority to these community-driven fixes. Once reviewed and approved, we'll merge your solution and credit your contribution.
For issues outside the mentioned categories, you can opt to fund their resolution. Each open issue is linked to an order form where you can contribute financially. We prioritize these issues based on the funding amount provided.
Open source thrives when its community is active. Even if you're not fixing bugs, consider contributing through code improvements, documentation updates, tutorials, or by assisting others in community channels. We highly encourage everyone, as a community, to help support open-source work.
To reiterate, DefectiveCode will prioritize bugs based on how they impact our paid products, community pull requests, and the financial support received for issues.
The MIT License (MIT). Please see License File for more information.