jangregor/phpstan-prophecy
PHPStan extension for phpspec/prophecy that improves type inference in tests. It teaches PHPStan the real types returned from Prophecy workflows like prophesize(), willExtend(), and reveal(), so your revealed doubles are understood as the mocked class.
prophesize()->reveal()) are correctly typed during CI/CD checks, reducing debugging time and production bugs.phpstan/extension-installer.For executives: "This tool catches test-related bugs before code reaches production by ensuring PHPStan correctly understands our test doubles. It reduces debugging time by 20-30% for test code and strengthens our quality gates with minimal setup—no engineering effort required beyond a single Composer command. It’s a low-cost, high-ROI investment in developer productivity and product reliability."
For engineering: "Simply install it, and PHPStan will automatically infer the correct types for all Prophecy test doubles (e.g., prophesize()->reveal()), eliminating false positives in test analysis. No manual type hints needed—just cleaner CI checks, faster code reviews, and confidence that our tests are type-safe. Zero configuration if using phpstan/extension-installer."
How can I help you explore Laravel packages today?