PHPackages                             polishsymfonycommunity/symfony2-mocker-extension - 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. polishsymfonycommunity/symfony2-mocker-extension

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

polishsymfonycommunity/symfony2-mocker-extension
================================================

Behat extension for mocking services defined in the Symfony2 dependency injection container.

v2.0.0(10y ago)26253.1k↓33.3%73MITPHPPHP ^5.5|^7.0

Since Jul 2Pushed 10y ago2 watchersCompare

[ Source](https://github.com/PolishSymfonyCommunity/Symfony2MockerExtension)[ Packagist](https://packagist.org/packages/polishsymfonycommunity/symfony2-mocker-extension)[ Docs](http://symfonylab.pl)[ RSS](/packages/polishsymfonycommunity-symfony2-mocker-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (6)Used By (3)

Symfony2 Mocker Extension
=========================

[](#symfony2-mocker-extension)

[![Build Status](https://camo.githubusercontent.com/422d8e57f4bc8ef7ebf3084c4a46a959212e12fe7f7f1f90cd1e4a2eceb608ee/68747470733a2f2f7472617669732d63692e6f72672f506f6c69736853796d666f6e79436f6d6d756e6974792f53796d666f6e79324d6f636b6572457874656e73696f6e2e737667)](https://travis-ci.org/PolishSymfonyCommunity/Symfony2MockerExtension)

Behat extension for mocking services defined in the Symfony2 dependency injection container.

**This extension was always a hack. For a better approach try .**

**Use it sparingly. Mocking a service container is not a good practice. Most of the time if there's a need for this, the problem can be better solved by improving the design instead.**

Internally it uses [Mockery](https://github.com/padraic/mockery) and [SymfonyMockerContainer](https://github.com/PolishSymfonyCommunity/SymfonyMockerContainer).

Documentation
-------------

[](#documentation)

[Official documentation](doc/index.rst)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96% 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 ~335 days

Total

5

Last Release

3722d ago

Major Versions

v1.0.2 → v2.0.02016-03-04

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.2

v2.0.0PHP ^5.5|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/012270929478a287f88353135a39d275db09c1856d344d0245e04df709879262?d=identicon)[jakzal](/maintainers/jakzal)

---

Top Contributors

[![jakzal](https://avatars.githubusercontent.com/u/190447?v=4)](https://github.com/jakzal "jakzal (24 commits)")[![jb-reynaud](https://avatars.githubusercontent.com/u/390431?v=4)](https://github.com/jb-reynaud "jb-reynaud (1 commits)")

---

Tags

testBDDTDDmockerymockBehat

### Embed Badge

![Health badge](/badges/polishsymfonycommunity-symfony2-mocker-extension/health.svg)

```
[![Health](https://phpackages.com/badges/polishsymfonycommunity-symfony2-mocker-extension/health.svg)](https://phpackages.com/packages/polishsymfonycommunity-symfony2-mocker-extension)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[polishsymfonycommunity/symfony-mocker-container

Provides base Symfony dependency injection container enabling service mocking.

1468.0M237](/packages/polishsymfonycommunity-symfony-mocker-container)[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)[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.1M96](/packages/php-mock-php-mock-mockery)[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)[brain/monkey

Mocking utility for PHP functions and WordPress plugin API

33412.5M350](/packages/brain-monkey)

PHPackages © 2026

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