PHPackages                             php-middleware/maintenance - 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. php-middleware/maintenance

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

php-middleware/maintenance
==========================

Site maintenance middleware SEO friendly with PSR-7

2.0.0(7y ago)8221[1 PRs](https://github.com/php-middleware/maintenance/pulls)MITPHPPHP &gt;=7.1

Since Nov 30Pushed 5y ago3 watchersCompare

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

READMEChangelog (4)Dependencies (7)Versions (9)Used By (0)

maintenance [![Build Status](https://camo.githubusercontent.com/a072ab67d4466a0a5eceb8f917b0ed9a55a95289ae5401b223eabe3886f23911/68747470733a2f2f7472617669732d63692e6f72672f7068702d6d6964646c65776172652f6d61696e74656e616e63652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-middleware/maintenance)
=========================================================================================================================================================================================================================================================================================================================

[](#maintenance-)

Site maintenance middleware SEO friendly

How to usage
------------

[](#how-to-usage)

Create instance of middleware as you want (we use [named constructors](http://verraes.net/2014/06/named-constructors-in-php/)) and add it to middleware runner.

```
$date = DateTime::createFromFormat('Y-m-d H:i:s', '2025-11-30 11:12:13');

$middleware = MaintenanceMiddleware::createWithRetryAsDateTime($date, $psr17ResponseFactory);

$middlewareRunner->add($middleware);
$middlewareRunner->run();
```

Features
--------

[](#features)

- Setup 503 status code,
- Supports `Retry-After` header (as seconds or HTTP-date),
- Supports `Redirect` header (redirect page after `Retry-After` time).

More about this SEO practice: [How to deal with planned site downtime](http://googlewebmastercentral.blogspot.com/2011/01/how-to-deal-with-planned-site-downtime.html) in Google Webmaster Central Blog.

How to install
--------------

[](#how-to-install)

Use composer!

```
composer require php-middleware/maintenance
```

This package require [PSR-17 message factory](https://packagist.org/providers/psr/http-factory-implementation) implementation to return SEO friendly response.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% 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 ~350 days

Total

4

Last Release

2814d ago

Major Versions

1.1.0 → 2.0.02018-10-16

PHP version history (3 changes)1.0.0PHP &gt;=5.5

1.1.0PHP &gt;=5.6

2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/312655?v=4)[Witold Wasiczko](/maintainers/snapshotpl)[@snapshotpl](https://github.com/snapshotpl)

---

Top Contributors

[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (18 commits)")[![Iandenh](https://avatars.githubusercontent.com/u/2911923?v=4)](https://github.com/Iandenh "Iandenh (1 commits)")

---

Tags

maintenancemaintenance-modemiddlewarephppsr-15psr-17psr-7seopsrpsr-7middlewarepsr-17psr-15maintenance

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-middleware-maintenance/health.svg)

```
[![Health](https://phpackages.com/badges/php-middleware-maintenance/health.svg)](https://phpackages.com/packages/php-middleware-maintenance)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[mezzio/mezzio

PSR-15 Middleware Microframework

3913.8M120](/packages/mezzio-mezzio)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

577.0M95](/packages/laminas-laminas-stratigility)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28146.3k](/packages/phpro-http-tools)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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