Product Decisions This Supports
- Test-tooling standardization: Informs whether to standardize on PHPUnit/Pest-style assertions or support an expressive matcher DSL, particularly where behavior-driven specs are used for stakeholder-facing documentation.
- Build vs. buy for assertion ergonomics: Leo offers a prebuilt expectation/matcher layer (e.g., readable
expect(...)->to->... chains and custom matchers) that could otherwise be hand-rolled. The decision is whether adopting 36-star, stale code beats writing a thin internal matcher helper.
- Legacy Peridot remediation: If any team owns a Peridot-based suite, this package is effectively part of the testing stack. That drives a roadmap item: migrate off Peridot + Leo or vendor/fork and pin.
- Domain-specific matcher design: Useful reference model for product/engineering teams designing custom matchers around domain concepts (e.g., order state, pricing rules, entitlement checks) to make specs readable to non-engineers.
- Dependency risk policy: A concrete test case for third-party dependency governance — last release 2017-08-16, low adoption, low opportunity score (1.14). Feeds the "acceptable dependency" checklist and security/maintenance gating.
- Developer experience investment: Informs whether assertion readability is a real productivity lever worth funding, or a nice-to-have that should stay inside the existing framework.
When to Consider This Package
Consider it when all or most of the following hold:
- You have an existing Peridot test suite or an internal tool built against Leo's matcher API, and rewriting is not on the roadmap this cycle.
- You are on a legacy PHP runtime (e.g., PHP 5.6/7.x era) where modern Pest/PHPUnit expectation APIs are not available.
- You need a small, self-contained assertion DSL for a spec-style or DSL-driven testing layer, and you are willing to vendor, pin, or fork the code.
- You want a cheap reference implementation for custom matchers rather than a long-term dependency — i.e., read it, adapt it, own it.
- License compatibility matters and MIT is acceptable (it is).
Look elsewhere when:
- You are starting a new project — use PHPUnit, Pest, or the framework's native expectations. Zero maintenance burden, active security support.
- You require active maintenance, PHP 8.x+ support, or CVE response — the 2017 last release means effectively no upstream support.
- Your organization has a dependency policy requiring recent releases or adoption thresholds (36 stars and a 1.14 opportunity score will fail most gates).
- You need coverage, mocking, parallelization, or CI integration — Leo is assertion-only; that's a framework decision, not this package.
- You need long-term vendor support — there is no commercial backing here.
How to Pitch It (Stakeholders)
For executives (30 seconds):
Leo is an MIT-licensed PHP assertion library that makes tests read more like plain English. It is small, free, and low-risk to try, but it is unmaintained since 2017 with minimal adoption. Recommendation: do not make it a strategic dependency. Use it only as a reference or a contained artifact inside an existing legacy test suite, and treat any migration off it as a low-priority cleanup item with no customer-facing impact.
For engineering leads:
Leo gives you expressive, chainable expectations and a clean model for custom matchers — genuinely useful for domain-readable specs. But the trade-off is real: no upstream fixes, no PHP 8 guarantees, no security response. If we adopt it, we vendor and pin it, wrap it behind our own assertion helper so it's swappable, and cap the blast radius to the suites that already depend on Peridot. For new work, we standardize on PHPUnit/Pest.
For product/QA stakeholders:
The value is readability of behavioral specs — assertions that business stakeholders can skim. That helps with acceptance criteria and regression documentation. The cost is maintenance risk in the test layer only, not production runtime. No customer impact if it fails; the downside is developer time and slowed test modernization.