PHPackages                             jangregor/phpstan-prophecy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jangregor/phpstan-prophecy

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

jangregor/phpstan-prophecy
==========================

Provides a phpstan/phpstan extension for phpspec/prophecy

2.3.0(3mo ago)11118.6M—9.9%30[3 issues](https://github.com/Jan0707/phpstan-prophecy/issues)20MITPHPPHP ^7.4 || ^8.0CI passing

Since Dec 8Pushed yesterday3 watchersCompare

[ Source](https://github.com/Jan0707/phpstan-prophecy)[ Packagist](https://packagist.org/packages/jangregor/phpstan-prophecy)[ RSS](/packages/jangregor-phpstan-prophecy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (29)Used By (20)

phpstan-prophecy
================

[](#phpstan-prophecy)

[![Close](https://github.com/Jan0707/phpstan-prophecy/workflows/Close/badge.svg)](https://github.com/Jan0707/phpstan-prophecy/actions)[![Integrate](https://github.com/Jan0707/phpstan-prophecy/workflows/Integrate/badge.svg)](https://github.com/Jan0707/phpstan-prophecy/actions)[![Merge](https://github.com/Jan0707/phpstan-prophecy/workflows/Merge/badge.svg)](https://github.com/Jan0707/phpstan-prophecy/actions)[![Triage](https://github.com/Jan0707/phpstan-prophecy/workflows/Triage/badge.svg)](https://github.com/Jan0707/phpstan-prophecy/actions)

[![Latest Stable Version](https://camo.githubusercontent.com/e746b689bc657cf5c600b4ca0211e4efff42e038b74267e866e35e3ecfe5e913/68747470733a2f2f706f7365722e707567782e6f72672f6a616e677265676f722f7068707374616e2d70726f70686563792f762f737461626c65)](https://packagist.org/packages/jangregor/phpstan-prophecy)[![Total Downloads](https://camo.githubusercontent.com/b0b45b142d7cbf1b4ece10bb232dd6293b6707130457571a0ebddf24f5d35e9d/68747470733a2f2f706f7365722e707567782e6f72672f6a616e677265676f722f7068707374616e2d70726f70686563792f646f776e6c6f616473)](https://packagist.org/packages/jangregor/phpstan-prophecy)

[![Violinist Enabled](https://camo.githubusercontent.com/d9732258721280d90f7f95b5f928ea5c63eb6d3d740151d62e4a9ad1660d95d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76696f6c696e6973742d656e61626c65642d627269676874677265656e2e737667)](https://violinist.io)

Provides a [`phpspec/prophecy`](https://github.com/phpspec/prophecy) extension for [`phpstan/phpstan`](https://github.com/phpstan/phpstan).

Installation
------------

[](#installation)

Run

```
composer require --dev jangregor/phpstan-prophecy
```

Configuration
-------------

[](#configuration)

### Automatic

[](#automatic)

When using [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer), no further setup is required.

### Manual

[](#manual)

When not using [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer), [`extension.neon`](extension.neon) needs to be included in `phpstan.neon`:

```
 includes:
+	- vendor/jangregor/phpstan-prophecy/extension.neon
```

Usage
-----

[](#usage)

### `prophesize()` and `reveal()`

[](#prophesize-and-reveal)

```
