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. | 531 | 534 | 56 | 3M | 35 | 38.6 | 74.3 | MIT | 3 months ago | |
| console-helpers/prophecy-phpunit | 0.86 | PHPUnit integration helpers for Prophecy, providing convenience traits and utilities to streamline mock creation, prophecy assertions, and cleanup in your test suite. Designed to reduce boilerplate and keep Prophecy-based unit tests tidy and consistent. | 0 | 0 | 1 | 173 | 0 | 19.3 | — | MIT | 3 weeks 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. | 104 | 104 | 24 | 984K | 9 | 9.6 | 57.2 | MIT | 1 year 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. | 194 | 195 | 42 | 1M | 1 | 19.3 | 60.3 | MIT | 3 months ago |
How can I help you explore Laravel packages today?