Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eris Laravel Package

giorgiosironi/eris

Eris brings QuickCheck-style property-based testing to PHP and PHPUnit. Define properties, generate many randomized inputs, and let Eris shrink failing cases to minimal counterexamples. Works with PHP 8.1+ and PHPUnit 10–13 via a simple TestTrait.

View on GitHub
Deep Wiki
Context7

Eris is a porting of Quickcheck and property-based testing tools to the PHP and PHPUnit ecosystem.

Frequently asked questions about Eris
How do I install Eris for Laravel property-based testing?
Run `composer require --dev giorgiosironi/eris` in your Laravel project. Eris integrates with PHPUnit 10–13, which is already a dependency in most Laravel apps. No additional Laravel configuration is needed.
Can Eris replace traditional unit tests in Laravel?
No—Eris complements unit tests by automatically generating edge cases, but critical paths (e.g., payment logic) still need deterministic validation. Use it for validation rules, Eloquent models, or API contracts where random inputs reveal hidden bugs.
Does Eris work with Laravel’s database testing (e.g., refreshDatabase)?
Yes, but combine it with Laravel’s `DatabaseTransactions` trait or `refreshDatabase()` to isolate tests. Eris may generate invalid database states, so transaction rollbacks are essential for reliability.
How do I test Laravel validation logic with Eris?
Use `Generators::faker()` or `Generators::choose()` to generate random inputs, then assert validation passes/fails. For example, test a `FormRequest` rule by feeding it synthetic data and checking responses.
What’s the performance impact of Eris in CI?
Eris runs efficiently for small-to-medium test suites. Limit iterations with `@eris-repeat(100)` or filter tests in CI. For large projects, parallelize tests using GitHub Actions’ matrix strategy.
How does Eris handle shrinking failing test cases?
When a test fails, Eris automatically shrinks the input to the smallest possible counterexample. For example, if testing a validation rule fails with a complex object, it’ll isolate the minimal property causing the issue.
Are there Laravel-specific examples for Eris?
Yes—test Eloquent relationships by generating synthetic models, validate API responses with random payloads, or stress-test caching logic. The [Eris example repo](https://github.com/giorgiosironi/eris-example) shows basic usage.
Will Eris break if I upgrade Laravel 9→10+?
Eris supports PHP 8.1–8.4 and PHPUnit 10–13, which aligns with Laravel 9–10+. No Laravel-specific hooks exist, so upgrades are safe as long as PHPUnit compatibility is maintained.
How do I visualize Eris test results in Laravel?
Use PHPUnit’s built-in reporters (e.g., `--testdoxhtml`) or integrate with Laravel Scout for custom dashboards. For CI, log shrinking results to a file or database table for later analysis.
What alternatives exist for property-based testing in PHP/Laravel?
Eris is the most mature option for PHP. Alternatives include custom scripts with PHPUnit’s data providers or tools like [Prophecy](https://prophesy-orm.org/) for mocking, but none offer QuickCheck-style shrinking. Eris is ideal for Laravel’s ecosystem.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai