daverandom/callback-validator
Validate PHP callable signatures against a prototype with variance support. Build a CallbackType from an existing callable or define it manually, then test other callables for parameter/return compatibility (contra/covariance, nullability) and inspect mismatches via __toString().
For executives: "Prevents costly production bugs by ensuring third-party callbacks conform to expected signatures, reducing support costs and improving system reliability. For engineering: integrates seamlessly via Composer with minimal performance overhead when cached, handles complex variance rules out-of-the-box, and eliminates manual signature validation logic—freeing teams to focus on core features."
How can I help you explore Laravel packages today?