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.
Architecture fit: Targets PHPStan users leveraging Prophecy for test doubles. Fits well in projects already using both tools, but Laravel's default testing stack (PHPUnit mocks) rarely uses Prophecy, limiting relevance to niche use cases. PHPStan's static analysis benefits from this extension only when Prophecy is actively used in tests.
Integration feasibility: Simple via Composer (composer require --dev jangregor/phpstan-prophecy). Automatic configuration with phpstan/extension-installer or manual extension.neon inclusion. Requires existing PHPStan and Prophecy dependencies.
Technical risk: Low adoption (0 dependents) indicates minimal community usage and potential maintenance concerns. Last release date (2026-02-10) appears erroneous; actual activity (changelog shows 2020-2021 updates) suggests inconsistent maintenance. Compatibility with PHPStan 1.0+ is confirmed, but future PHPStan updates may break functionality if not actively maintained.
Key questions: Is Prophecy actively used in test suites? What is the project's current maintenance cadence? How does the package handle PHPStan version upgrades? Are there known issues with Laravel-specific test patterns?
Stack fit: Only relevant for Laravel projects using Prophecy for test doubles (uncommon in typical
How can I help you explore Laravel packages today?