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.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| phpstan/phpstan-phpunit | 0.87 | PHPStan extension for PHPUnit: improves type inference for mocks (intersection types for createMock/getMock), understands Foo|MockObject phpDocs, adds early-terminating methods to avoid undefined vars, and refines assert() types. Optional strict rules catch improper assertion usage. | 527 | 531 | 56 | 3M | 33 | 44.1 | 78.9 | MIT | 1 month ago | |
| phpstan/phpstan-mockery | 0.85 | PHPStan extension for Mockery: infers intersection types for mocks (Foo&MockInterface), understands shouldReceive/shouldHaveReceived/allows/expects, supports partial/alias/overload mocks, multiple interfaces, and proper constructor args for accurate static analysis. | 102 | 100 | 24 | 995K | 9 | 29.7 | 68.8 | MIT | 1 year ago | |
| phpspec/prophecy | 0.85 | Highly opinionated yet flexible PHP mocking framework for unit tests. Create test doubles with a Prophet, define expected calls and return values, then reveal mocks and verify predictions. Works with PHPUnit and other frameworks; requires PHP 7.2+. | 8,487 | 8,509 | 248 | 3M | 88 | 81.7 | 70.5 | MIT | 1 month ago | |
| phpspec/prophecy-phpunit | 0.82 | Integrates the Prophecy mocking library with PHPUnit for simpler, cleaner test doubles. Install via Composer and use the ProphecyTrait to call prophesize() inside your TestCase, set method predictions/returns, and reveal mocks for injection. | 192 | 193 | 42 | 1M | 1 | 25.5 | 63.4 | MIT | 1 month ago |
How can I help you explore Laravel packages today?