PHPackages                             emgag/varnish-towncrier - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. emgag/varnish-towncrier

ActiveLibrary[HTTP &amp; Networking](/categories/http)

emgag/varnish-towncrier
=======================

PHP client for varnish-towncrier

v1.3.0(5y ago)01.2kMITPHPPHP &gt;=7.3CI failing

Since Mar 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/emgag/varnish-towncrier-php)[ Packagist](https://packagist.org/packages/emgag/varnish-towncrier)[ RSS](/packages/emgag-varnish-towncrier/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

PHP client for varnish-towncrier
================================

[](#php-client-for-varnish-towncrier)

[![build](https://github.com/emgag/varnish-towncrier-php/workflows/build/badge.svg)](https://github.com/emgag/varnish-towncrier-php/workflows/build/badge.svg)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/3710a26a807b1b91ce562ba7f729edbba0cc726bb79ea0612a5d651d52528cb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d6761672f7661726e6973682d746f776e63726965722e737667)](https://packagist.org/packages/emgag/varnish-towncrier)

A PHP client for [varnish-towncrier](https://github.com/emgag/varnish-towncrier).

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

[](#installation)

```
composer require emgag/varnish-towncrier
```

Usage
-----

[](#usage)

```
use Emgag\VarnishTowncrier\VarnishTowncrier;

$client = new Predis\Client([
    'scheme' => 'tcp',
    'host'   => '127.0.0.1',
    'port'   => '6379'
]);

$vb = new VarnishTowncrier($client);

// BAN using a varnish VCL expression
$vb->ban('example.org', 'expression');
$vb->ban('example.org', ['multiple', 'expressions']);

// BAN using an URL pattern
$vb->banURL('example.org', 'pattern');
$vb->banURL('example.org', ['multiple', 'patterns']);

// PURGE using a path
$vb->purge('example.org', 'path');
$vb->purge('example.org', ['multiple', 'paths']);

// Purge cache surrogate keys
$vb->xkey('example.org', 'key');
$vb->xkey('example.org', ['multiple', 'keys']);

// Soft purge cache surrogate keys
$vb->xkeySoft('example.org', 'key');
$vb->xkeySoft('example.org', ['multiple', 'keys']);
```

See docs for [varnish-towncrier](https://github.com/emgag/varnish-towncrier) for more details.

License
-------

[](#license)

varnish-towncrier-php is licensed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~187 days

Recently: every ~229 days

Total

7

Last Release

1865d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.0

v1.2.0PHP &gt;=7.2

v1.3.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/35a34580a28286ae22173cc8f34f42699d846067c976e8e39fdc23b8ad0cf44a?d=identicon)[emgag](/maintainers/emgag)

---

Top Contributors

[![maetthu](https://avatars.githubusercontent.com/u/1193955?v=4)](https://github.com/maetthu "maetthu (27 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/emgag-varnish-towncrier/health.svg)

```
[![Health](https://phpackages.com/badges/emgag-varnish-towncrier/health.svg)](https://phpackages.com/packages/emgag-varnish-towncrier)
```

###  Alternatives

[yiicod/yii2-socketio

The simple and powerful socketio for the Yii2 framework

4619.7k](/packages/yiicod-yii2-socketio)[gointegro/hateoas

GOintegro HATEOAS Lib

408.0k1](/packages/gointegro-hateoas)[sfcod/socketio

SocketIo adapter for Symfony

252.7k](/packages/sfcod-socketio)

PHPackages © 2026

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