jasonmccreary/double
Double is a Laravel package by Jason McCreary for creating test doubles. It lets you swap real services for lightweight, configurable fakes that record method calls and return stubbed responses, keeping your test suite fast and free of heavy mocking boilerplate.
createMock() and Mockery. This is a platform/consistency decision more than a feature decision.Adopt when:
Look elsewhere when:
For executives (one paragraph): We are evaluating a small, MIT-licensed PHP library that makes writing test doubles — the fake objects used to isolate code in tests — faster and more readable. It is a development-only dependency: it never ships to production, so it carries no runtime or customer-facing risk, and it can be removed by changing test code alone. The business case is developer throughput and lower long-term test maintenance, not a product feature. The main caveat is maturity: it is a young, single-maintainer project with modest adoption, so we would adopt it deliberately — starting with new tests, keeping existing mocks in place — and cap our exposure.
For engineering leads:
How can I help you explore Laravel packages today?