PHPackages                             eloquent/phpstan-phony - 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. eloquent/phpstan-phony

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

eloquent/phpstan-phony
======================

PHPStan configuration for Phony.

0.8.0(4y ago)5107.0k↓41.3%420MITPHPPHP ^7.3 || ^8

Since Nov 16Pushed 2y ago2 watchersCompare

[ Source](https://github.com/eloquent/phpstan-phony)[ Packagist](https://packagist.org/packages/eloquent/phpstan-phony)[ Docs](http://eloquent-software.com/phony/)[ RSS](/packages/eloquent-phpstan-phony/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (12)Used By (20)

> # No longer maintained
>
> [](#no-longer-maintained)
>
> This package is no longer maintained. See [this statement](https://gist.github.com/ezzatron/713a548735febe3d76f8ca831bc895c0) for more info.

PHPStan configuration for Phony
===============================

[](#phpstan-configuration-for-phony)

[![Current version image](https://camo.githubusercontent.com/1b2b0175664e78cbd4d11244ecdfde53507cffca8d98fe9b40e5d80a094b1a21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6f7175656e742f7068707374616e2d70686f6e792e7376673f7374796c653d666c61742d737175617265 "This project uses semantic versioning")](https://packagist.org/packages/eloquent/phpstan-phony)

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

[](#installation)

```
composer require --dev eloquent/phpstan-phony

```

Usage
-----

[](#usage)

- When using [phpstan/extension-installer](https://github.com/phpstan/extension-installer), no configuration is necessary.
- Alternatively, an include can be added to the PHPStan configuration:

```
includes:
  - vendor/eloquent/phpstan-phony/phony.neon
```

Features
--------

[](#features)

This repo currently supports correct type information for the following Phony mocking use cases:

```
mock(ClassA::class)->get();
mock([ClassA::class, ClassB::class])->get();
partialMock(ClassA::class)->get();
partialMock([ClassA::class, ClassB::class])->get();
mockBuilder(ClassA::class)->get();
mockBuilder([ClassA::class, ClassB::class])->get();
mockBuilder(ClassA::class)->full();
mockBuilder([ClassA::class, ClassB::class])->full();
mockBuilder(ClassA::class)->partial();
mockBuilder([ClassA::class, ClassB::class])->partial();
mockBuilder(ClassA::class)->partialWith();
mockBuilder([ClassA::class, ClassB::class])->partialWith();

Phony::mock(ClassA::class)->get();
Phony::mock([ClassA::class, ClassB::class])->get();
Phony::partialMock(ClassA::class)->get();
Phony::partialMock([ClassA::class, ClassB::class])->get();
Phony::mockBuilder(ClassA::class)->get();
Phony::mockBuilder([ClassA::class, ClassB::class])->get();
Phony::mockBuilder(ClassA::class)->full();
Phony::mockBuilder([ClassA::class, ClassB::class])->full();
Phony::mockBuilder(ClassA::class)->partial();
Phony::mockBuilder([ClassA::class, ClassB::class])->partial();
Phony::mockBuilder(ClassA::class)->partialWith();
Phony::mockBuilder([ClassA::class, ClassB::class])->partialWith();

mock(ClassA::class)->methodA;
onStatic(mock(ClassA::class))->staticMethodA;
```

License
-------

[](#license)

For the full copyright and license information, please view the [LICENSE file](LICENSE).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~144 days

Recently: every ~179 days

Total

11

Last Release

1659d ago

PHP version history (4 changes)0.1.0PHP &gt;=7

0.3.0PHP &gt;=7.1

0.7.0PHP &gt;=7.2

0.7.2PHP ^7.3 || ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/100152?v=4)[Erin](/maintainers/ezzatron)[@ezzatron](https://github.com/ezzatron)

---

Top Contributors

[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (75 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (5 commits)")

---

Tags

mockingtestmockstubstaticanalysisfakespyDummyDoublestubbing

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/eloquent-phpstan-phony/health.svg)

```
[![Health](https://phpackages.com/badges/eloquent-phpstan-phony/health.svg)](https://phpackages.com/packages/eloquent-phpstan-phony)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[icecave/isolator

Dependency injection for global functions.

371.3M29](/packages/icecave-isolator)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[phake/phake

The Phake mock testing library

4758.0M324](/packages/phake-phake)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
