dg/bypass-finals
DG\BypassFinals lets you bypass PHP’s final classes and methods at runtime so you can mock, extend, or patch code that’s otherwise locked down—useful for testing legacy dependencies. Lightweight, Composer-ready, and works with popular test frameworks.
final classes, eliminating the need for code forks or manual source modificationsfinal classes/methods prevent mockingfinal (prefer design improvements over runtime hacks)"This package solves a critical testing gap for modern PHP applications: enabling mocking of final classes and methods without altering vendor code. For executives, it accelerates feature delivery by unblocking test coverage for legacy and third-party dependencies, reducing production risks and technical debt. For engineering teams, it integrates effortlessly with existing testing tools like PHPUnit, eliminating manual workarounds and preserving clean, maintainable test suites—all while ensuring zero impact on production behavior."
How can I help you explore Laravel packages today?