expect/peridot-expect-plugin
Peridot plugin that adds Expect-style assertions to your specs, so you can write expressive expect($value)->to... checks inside Peridot tests. Install with Composer and enable the plugin in your Peridot configuration for readable, behavior-driven PHP testing.
expect($value)->to->be->equal(...)-style matchers to Peridot, the PHP BDD/spec framework. The product value is indirect: more expressive specs mean tests read like acceptance criteria, which shortens onboarding, makes code review of test intent faster, and turns specs into lightweight living documentation of business rules.composer require in require-dev instead of writing and maintaining bespoke assertion helpers and matcher extensions. The PM decision is whether engineering time is better spent on custom test utilities or on product work.expect() natively and dominates ecosystem mindshare). This package's existence is a signal that the "stay on Peridot" path has a viable DX story, but only a thin one.Consider it when all of the following hold:
Look elsewhere when:
expect() plus a large ecosystem, active maintenance, IDE/static-analysis support) or PHPUnit (org default, universal tooling). Do not start a new suite on Peridot.To executives: A free, MIT-licensed add-on that makes our PHP tests more readable, which speeds onboarding and reduces the chance of defects slipping through review. Cost is essentially zero and it's isolated to development dependencies, so it carries no runtime or customer-facing risk. Treat it as a tactical quality-of-life improvement, not a strategic platform bet — it has no support contract and a very small user base (1 star, 0 dependents), so we should not build a multi-year dependency on it.
To engineering: The plugin brings expect()->to->be matchers to Peridot, cutting custom assertion boilerplate and making specs read closer to plain English. Adoption is a dev-dependency plus a small config change, fully reversible, and test-only in scope. Two caveats: it's effectively unmaintained, so pin the version and be prepared to vendor it; and if Peridot is strategically important to us, we should pair this with a scoped evaluation of migrating to Pest or PHPUnit, which offer equivalent ergonomics with active ecosystems.
How can I help you explore Laravel packages today?