PHPackages                             filisko/fake-psr3-logger - 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. filisko/fake-psr3-logger

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

filisko/fake-psr3-logger
========================

Fake PSR-3 logger implementation for integration testing

v1.1.0(1y ago)1410MITPHPPHP &gt;=7.1CI passing

Since Apr 23Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/filisko/fake-psr3-logger)[ Packagist](https://packagist.org/packages/filisko/fake-psr3-logger)[ Docs](https://github.com/filisko/fake-psr3-logger)[ RSS](/packages/filisko-fake-psr3-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Fake PSR-3 logger
=================

[](#fake-psr-3-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5a2627a143a84df9ccc7125d5e6a3be878b30502c65c4007cebfd21eaba79d57/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696c69736b6f2f66616b652d707372332d6c6f676765722e7376673f7374796c653d666c6174)](https://packagist.org/packages/filisko/fake-psr3-logger)[![Software License](https://camo.githubusercontent.com/011ab289702ea32abcf53bc0d330758d85023ed63c970663774b31db27aef51e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c2e7376673f7374796c653d666c6174)](LICENSE)[![Testing](https://github.com/filisko/fake-psr3-logger/workflows/testing/badge.svg)](https://github.com/filisko/fake-psr3-logger/workflows/testing/badge.svg)[![Coverage Status](https://camo.githubusercontent.com/5a9035e49a082e7116a7734142f1c65d8ee68aaaa460ba246bdfaf7fa936bc1a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f66696c69736b6f2f66616b652d707372332d6c6f676765722f62616467652e7376673f6272616e63683d6d61696e)](https://camo.githubusercontent.com/5a9035e49a082e7116a7734142f1c65d8ee68aaaa460ba246bdfaf7fa936bc1a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f66696c69736b6f2f66616b652d707372332d6c6f676765722f62616467652e7376673f6272616e63683d6d61696e)[![Total Downloads](https://camo.githubusercontent.com/82a53425116be6f588f562f434d73be897e2a9a5868aa59d13e5cb9c7a063389/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66696c69736b6f2f66616b652d707372332d6c6f676765722e7376673f7374796c653d666c6174)](https://packagist.org/packages/filisko/fake-psr3-logger)

A package that provides a simple PSR-3 implementation for integration tests.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

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

[](#installation)

This package is installable and autoloadable via Composer as [filisko/fake-psr3-logger](https://packagist.org/packages/filisko/fake-psr3-logger).

```
composer require filisko/fake-psr3-logger --dev
```

Usage
-----

[](#usage)

This package provides a [PSR-3](http://www.php-fig.org/psr/psr-3/) (`Psr\Log\LoggerInterface`) implementation that allows you to verify the logging your code has made.

```
use Filisko\FakeLogger;

// PHP Unit scenario

$logger = new FakeLogger();
$logger->info('Something interesting happened', [
    'user_id' => 1
]);

// logs exposed
$logs = $logger->logs();

$this->assertSame([
    [
        'level' => 'info',
        'message' => 'Something interesting happened',
        'context' => [
            'user_id' => 1,
        ],
    ]
], $logs);

$this->assertSame(1, $logger->count());
```

Other testing utilities
-----------------------

[](#other-testing-utilities)

- PSR-16 fake cache: [kodus/mock-cache](https://github.com/kodus/mock-cache)
- PSR-15 middleware dispatcher: [middlewares/utils](https://github.com/middlewares/utils?tab=readme-ov-file#dispatcher) (used in conjuction with PSR-7 and PSR-17)
- Testable PHP functions: [filisko/testable-phpfunctions](https://github.com/filisko/testable-phpfunctions)

---

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes and [CONTRIBUTING](CONTRIBUTING.md) for contributing details.

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance50

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~9 days

Total

3

Last Release

366d ago

PHP version history (2 changes)v1.0.0PHP ^7.2 || ^8.0

v1.1.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/42e0d72f42eb7d84f67e20d28606da42e5a3248ca908b1eadb4366aafeae2561?d=identicon)[filisko](/maintainers/filisko)

---

Top Contributors

[![filisko](https://avatars.githubusercontent.com/u/8798694?v=4)](https://github.com/filisko "filisko (45 commits)")

---

Tags

logpsr-3testingmockserverloggerfake

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/filisko-fake-psr3-logger/health.svg)

```
[![Health](https://phpackages.com/badges/filisko-fake-psr3-logger/health.svg)](https://phpackages.com/packages/filisko-fake-psr3-logger)
```

###  Alternatives

[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[colinodell/psr-testlogger

PSR-3 compliant test logger based on psr/log v1's, but compatible with v2 and v3 too!

1712.1M47](/packages/colinodell-psr-testlogger)[yiisoft/log

Yii Logging Library

42917.2k26](/packages/yiisoft-log)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2818.1k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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