PHPackages                             worksome/pest-plugin-silence - 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. [Framework](/categories/framework)
4. /
5. worksome/pest-plugin-silence

AbandonedArchivedLibrary[Framework](/categories/framework)

worksome/pest-plugin-silence
============================

Prevent unwanted output in tests.

v0.1.2(4y ago)6299.1k↑104.2%1MITPHPPHP ^8.0

Since Feb 22Pushed 2y ago3 watchersCompare

[ Source](https://github.com/worksome/pest-plugin-silence)[ Packagist](https://packagist.org/packages/worksome/pest-plugin-silence)[ RSS](/packages/worksome-pest-plugin-silence/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

This repository has been archived and is no longer maintained.

Pest Plugin Silence
===================

[](#pest-plugin-silence)

[![Tests](https://github.com/worksome/pest-plugin-silence/actions/workflows/tests.yml/badge.svg)](https://github.com/worksome/pest-plugin-silence/actions/workflows/tests.yml)[![PHPStan](https://github.com/worksome/pest-plugin-silence/actions/workflows/static.yml/badge.svg)](https://github.com/worksome/pest-plugin-silence/actions/workflows/static.yml)

Often, when writing tests, we `echo` and `dump` test code to debug and check everything is working correctly. It can be easy to forget to remove those statements when you've finished, which can lead to a lot of messy output in your test results. Yuk!

Silence is a lightweight plugin for [Pest](https://pestphp.com) that will cause any test that `echo`s or `dump`s to the console to fail, meaning that you'll never forget to remove those statements from your codebase.

Before:

[![CleanShot 2022-02-22 at 14 51 15@2x](https://user-images.githubusercontent.com/12202279/155157865-6fe199e7-504c-4354-96e1-33b052cffe31.png)](https://user-images.githubusercontent.com/12202279/155157865-6fe199e7-504c-4354-96e1-33b052cffe31.png)

After:

[![CleanShot 2022-02-22 at 14 53 35@2x](https://user-images.githubusercontent.com/12202279/155157966-6ec4049b-0865-4e5c-99d8-1732e0636089.png)](https://user-images.githubusercontent.com/12202279/155157966-6ec4049b-0865-4e5c-99d8-1732e0636089.png)

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

[](#installation)

Install the plugin via composer.

```
composer require worksome/pest-plugin-silence --dev
```

Usage
-----

[](#usage)

Silence isn't enabled out of the box. However, it's simple to enable it for your project using one of two methods.

### Enable with an environment variable

[](#enable-with-an-environment-variable)

You can enable Silence using the `PREVENT_OUTPUT` environment variable whilst running your tests. You may add this to your `phpunit.xml`.

```

```

### Enable manually in your test or `TestCase`

[](#enable-manually-in-your-test-or-testcase)

Alternatively, for a more selective approach, you may enable Silence in your test or `TestCase` using the `Silence::preventOutput()` method.

```
use Worksome\PestPluginSilence\Silence;

it('just works', function () {
    Silence::preventOutput();

    echo "Uh-oh!"

    expect(true)->toBeTrue();
});
```

If you want to manually enable Silence for every test, place it in the `setUp` method of your `TestCase`.

```
class TestCase extends BaseTestCase
{
    public function setUp(): void
    {
        parent::setUp();

        Silence::preventOutput();
    }
}
```

Testing
-------

[](#testing)

Silence is fully tested, and also implements strict static analysis. You can run the test suite using our test script:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Luke Downing](https://github.com/lukeraymonddowning)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~0 days

Total

3

Last Release

1593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/139db346fa173a79481af05b0455e2e8ad7d2ab594c7f53bde3522a3dfeeaf25?d=identicon)[96downlu](/maintainers/96downlu)

---

Top Contributors

[![lukeraymonddowning](https://avatars.githubusercontent.com/u/12202279?v=4)](https://github.com/lukeraymonddowning "lukeraymonddowning (12 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (2 commits)")[![webhanspeter](https://avatars.githubusercontent.com/u/3475745?v=4)](https://github.com/webhanspeter "webhanspeter (1 commits)")

---

Tags

phpplugintestingunitframeworktestpest

### Embed Badge

![Health badge](/badges/worksome-pest-plugin-silence/health.svg)

```
[![Health](https://phpackages.com/badges/worksome-pest-plugin-silence/health.svg)](https://phpackages.com/packages/worksome-pest-plugin-silence)
```

###  Alternatives

[pestphp/pest

The elegant PHP Testing Framework.

11.6k72.2M20.7k](/packages/pestphp-pest)[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

99600.5k8](/packages/defstudio-pest-plugin-laravel-expectations)[jonpurvis/lawman

A PestPHP Plugin to help with architecture testing SaloonPHP integrations

4138.2k10](/packages/jonpurvis-lawman)[pestphp/pest-plugin-arch

The Arch plugin for Pest PHP.

4358.2M5.6k](/packages/pestphp-pest-plugin-arch)[pestphp/pest-plugin-browser

Pest plugin to test browser interactions

1343.7M189](/packages/pestphp-pest-plugin-browser)[pestphp/pest-plugin-type-coverage

The Type Coverage plugin for Pest PHP.

354.3M1.1k](/packages/pestphp-pest-plugin-type-coverage)

PHPackages © 2026

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