PHPackages                             ehough/mockery - 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. ehough/mockery

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

ehough/mockery
==============

Fork of padraic/mockery compatible with PHP 5.2+.

0.8.0(12y ago)088314BSD-3-ClausePHPPHP &gt;=5.2

Since Jul 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ehough/mockery)[ Packagist](https://packagist.org/packages/ehough/mockery)[ Docs](https://github.com/ehough/mockery)[ RSS](/packages/ehough-mockery/feed)WikiDiscussions develop Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (4)

mockery
-------

[](#mockery)

[![Build Status](https://camo.githubusercontent.com/3ed4040f258fba612d185d1c8b2c7f6b587e722837cf7624bcb256f45caa5c8b/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f65686f7567682f6d6f636b6572792e706e67)](http://travis-ci.org/ehough/mockery)[![Project Status: Unsupported - The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.](https://camo.githubusercontent.com/baae56ff2a4e564adcf10fe13a639b7e4aaf1d62054fd5086a2e570ecc3637e5/687474703a2f2f7777772e7265706f7374617475732e6f72672f6261646765732f6c61746573742f756e737570706f727465642e737667)](http://www.repostatus.org/#unsupported)[![Latest Stable Version](https://camo.githubusercontent.com/00d646e50590cdfc86df8aa4b4ca43a621e3393a184c11f75187eb935db97d62/68747470733a2f2f706f7365722e707567782e6f72672f65686f7567682f6d6f636b6572792f762f737461626c65)](https://packagist.org/packages/ehough/mockery)[![License](https://camo.githubusercontent.com/6b4993ea850388e0f53bcaafdf93ac488da3f0b1e5e61ba81a2f8800a327f20f/68747470733a2f2f706f7365722e707567782e6f72672f65686f7567682f6d6f636b6572792f6c6963656e7365)](https://packagist.org/packages/ehough/mockery)

**This library is no longer supported or maintained as PHP 5.2 usage levels have finally dropped below 10%**

Fork of [padraic/mockery](https://github.com/padraic/mockery) compatible with PHP 5.2+.

### Motivation

[](#motivation)

[padraic/mockery](https://github.com/padraic/mockery) is a fantastic mocking library, but it's only compatible with PHP 5.3+. While 99% of PHP servers run PHP 5.2 or higher, 12% of all servers are still running PHP 5.2 or lower ([source](http://w3techs.com/technologies/details/pl-php/5/all)).

### Differences from [padraic/mockery](https://github.com/padraic/mockery)

[](#differences-from-padraicmockery)

The primary difference is naming conventions of the [padraic/mockery](https://github.com/padraic/mockery) classes. Instead of the `\Mockery` namespace (and sub-namespaces), prefix the class names with `ehough_mockery` and follow the [PEAR naming convention](http://pear.php.net/manual/en/standards.php)

A few examples of class naming conversions:

```
\Mockery              ----->    ehough_mockery_Mockery
\Mockery\Mock         ----->    ehough_mockery_mockery_Mock
\Mockery\Matcher\Any  ----->    ehough_mockery_mockery_matcher_Any

```

### Usage

[](#usage)

Visit [padraic/mockery](https://github.com/padraic/mockery) for the current documentation.

### Releases and Versioning

[](#releases-and-versioning)

Releases are synchronized with the upstream padraic repository. e.g. `ehough/mockery 0.8.0` has merged the code from `padraic/mockery 0.8.0`.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

4725d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53b269d929f6ba572a15e4b069d9b59e0e99af74db1be60cbac7a56adfea9221?d=identicon)[ehough](/maintainers/ehough)

---

Top Contributors

[![padraic](https://avatars.githubusercontent.com/u/19780?v=4)](https://github.com/padraic "padraic (71 commits)")[![davedevelopment](https://avatars.githubusercontent.com/u/61351?v=4)](https://github.com/davedevelopment "davedevelopment (45 commits)")[![ehough](https://avatars.githubusercontent.com/u/369261?v=4)](https://github.com/ehough "ehough (23 commits)")[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (5 commits)")[![yugeon](https://avatars.githubusercontent.com/u/350226?v=4)](https://github.com/yugeon "yugeon (5 commits)")[![robertbasic](https://avatars.githubusercontent.com/u/166625?v=4)](https://github.com/robertbasic "robertbasic (5 commits)")[![agiledivider](https://avatars.githubusercontent.com/u/1173523?v=4)](https://github.com/agiledivider "agiledivider (5 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (4 commits)")[![gordalina](https://avatars.githubusercontent.com/u/787913?v=4)](https://github.com/gordalina "gordalina (3 commits)")[![Fgruntjes](https://avatars.githubusercontent.com/u/984466?v=4)](https://github.com/Fgruntjes "Fgruntjes (2 commits)")[![paulschwarz](https://avatars.githubusercontent.com/u/720418?v=4)](https://github.com/paulschwarz "paulschwarz (2 commits)")[![dcousineau](https://avatars.githubusercontent.com/u/30331?v=4)](https://github.com/dcousineau "dcousineau (2 commits)")[![alexdenvir](https://avatars.githubusercontent.com/u/1412074?v=4)](https://github.com/alexdenvir "alexdenvir (2 commits)")[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (1 commits)")[![aksonnic](https://avatars.githubusercontent.com/u/1252956?v=4)](https://github.com/aksonnic "aksonnic (1 commits)")[![bramski80](https://avatars.githubusercontent.com/u/89188435?v=4)](https://github.com/bramski80 "bramski80 (1 commits)")[![clemherreman](https://avatars.githubusercontent.com/u/272812?v=4)](https://github.com/clemherreman "clemherreman (1 commits)")[![dmitrybelyakov](https://avatars.githubusercontent.com/u/178866?v=4)](https://github.com/dmitrybelyakov "dmitrybelyakov (1 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (1 commits)")[![aderuwe](https://avatars.githubusercontent.com/u/1125184?v=4)](https://github.com/aderuwe "aderuwe (1 commits)")

---

Tags

testingtestlibraryBDDTDDmockerymockstubtest doublemock objects

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ehough-mockery/health.svg)

```
[![Health](https://phpackages.com/badges/ehough-mockery/health.svg)](https://phpackages.com/packages/ehough-mockery)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k516.1M26.1k](/packages/mockery-mockery)[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.

36919.3M119](/packages/php-mock-php-mock)[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.7M509](/packages/php-mock-php-mock-phpunit)[php-mock/php-mock-mockery

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

392.2M108](/packages/php-mock-php-mock-mockery)[kahlan/kahlan

The PHP Test Framework for Freedom, Truth and Justice.

1.1k1.2M255](/packages/kahlan-kahlan)[php-mock/php-mock-prophecy

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

16513.2k15](/packages/php-mock-php-mock-prophecy)

PHPackages © 2026

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