PHPackages                             aalfiann/slim-etag-middleware - 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. aalfiann/slim-etag-middleware

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

aalfiann/slim-etag-middleware
=============================

ETag Middleware for Slim Framework 3.

1.0.1(7y ago)01542MITPHP &gt;=5.5

Since May 10Compare

[ Source](https://github.com/aalfiann/slim-etag-middleware)[ Packagist](https://packagist.org/packages/aalfiann/slim-etag-middleware)[ RSS](/packages/aalfiann-slim-etag-middleware/feed)WikiDiscussions Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (2)

Slim ETag Middleware
====================

[](#slim-etag-middleware)

[![Version](https://camo.githubusercontent.com/15f81eeb9b13088a19eb518fe7cc8dd6f85a0293693484f073540ef5500d123d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61616c6669616e6e2f736c696d2d657461672d6d6964646c65776172652e737667)](https://packagist.org/packages/aalfiann/slim-etag-middleware)[![Downloads](https://camo.githubusercontent.com/f00a67d31758bc3196bc02467bf9b93bea32873a80170610598fd65552982c0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61616c6669616e6e2f736c696d2d657461672d6d6964646c65776172652e737667)](https://packagist.org/packages/aalfiann/slim-etag-middleware)[![License](https://camo.githubusercontent.com/943f4e3b119b2dd97bcc19d9845fb8afe4998012658ca7b323edf32beb883203/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61616c6669616e6e2f736c696d2d657461672d6d6964646c65776172652e737667)](https://github.com/aalfiann/slim-etag-middleware/blob/HEAD/LICENSE.md)

ETag Middleware for Slim Framework 3.

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

[](#installation)

Install this package via [Composer](https://getcomposer.org/).

```
composer require "aalfiann/slim-etag-middleware:^1.0"

```

Usage Example
-------------

[](#usage-example)

```
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use \aalfiann\Slim\Middleware\ETag;

// Initialize Slim App
$app = new \Slim\App($settings);

// create route /
$app->get('/', function (Request $request, Response $response) {
    $data = ['title' => 'hello world'];
    // create new strong etag. eg: "abc"
    return $response
        ->withHeader('ETag','"abc"')
        ->withJson($data,200,JSON_PRETTY_PRINT);
})
    // this etag middleware will check is current etag same as request etag or not?
    // if same then response header will be 304 Not Modified and empty body.
    ->add(new ETag('abc','strong'))
    ->setName("/");

$app->run();
```

Note
----

[](#note)

This etag middleware are used in my project &gt;&gt; [Slim API Skeleton](https://github.com/aalfiann/slim-api-skeleton).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

2

Last Release

2609d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c101f6be505e4713be942f6b80d849b46702e6f4069430e1dbbe60fa18289c54?d=identicon)[aalfiann](/maintainers/aalfiann)

---

Top Contributors

[![aalfiann](https://avatars.githubusercontent.com/u/9458941?v=4)](https://github.com/aalfiann "aalfiann (3 commits)")

---

Tags

middlewareEtagslimframework

### Embed Badge

![Health badge](/badges/aalfiann-slim-etag-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/aalfiann-slim-etag-middleware/health.svg)](https://phpackages.com/packages/aalfiann-slim-etag-middleware)
```

###  Alternatives

[league/uri

URI manipulation library

1.1k240.0M374](/packages/league-uri)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

44018.6M128](/packages/kevinrob-guzzle-cache-middleware)[psr/http-server-middleware

Common interface for HTTP server-side middleware

185103.9M1.8k](/packages/psr-http-server-middleware)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21911.7M73](/packages/caseyamcl-guzzle-retry-middleware)[matthewbdaly/laravel-etag-middleware

A Laravel middleware for adding ETags to HTTP requests to improve response times

64330.0k2](/packages/matthewbdaly-laravel-etag-middleware)[tkhamez/slim-role-auth

Role-based authorization for the Slim framework

1410.4k](/packages/tkhamez-slim-role-auth)

PHPackages © 2026

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