rawr/phpunit-data-provider
PHPUnit data provider helper for PHP tests. Simplifies building and organizing datasets, supports readable, reusable providers, and makes parameterized tests easier to maintain. Works with PHPUnit to generate cases cleanly and consistently.
Architecture fit: Designed as a pure dev dependency, it integrates seamlessly into Laravel's PHPUnit test architecture without affecting production code. The fluent interface replaces manual array-based data providers with composable operations, aligning with Laravel's emphasis on expressive, maintainable test code. It operates entirely within test classes, avoiding runtime dependencies or framework modifications.
Integration feasibility: Straightforward via Composer (composer require --dev rawr/phpunit-data-provider). However, compatibility with PHPUnit 10+ is unconfirmed (current docs reference PHPUnit 9.5.4), requiring validation for modern Laravel projects (which often use PHPUnit 10). Namespace changes from v2 to v3 necessitate code updates but are well-documented.
Technical risk: Low real-world adoption (0 dependents) suggests limited validation for edge cases like nested iterables or type-sensitive operations. Namespace migration could cause silent failures if not fully audited. Potential memory issues with large datasets are unaddressed in documentation.
Key questions:
Stack fit: Ideal for Laravel projects using PHPUnit 7.5–9.5.4. As a zero-runtime-dependency testing utility, it integrates cleanly into existing test structures without altering application logic. Best suited for teams with complex test data needs (e.g., permission matrices, multi-source data combinations) but not for simple single-source providers.
Migration path: For v2.x users:
\TRegx\DataProvider\ to \TRegx\PhpUnit\DataProviders\How can I help you explore Laravel packages today?