PHPackages                             hskrasek/guzzle-sunset - 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. hskrasek/guzzle-sunset

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

hskrasek/guzzle-sunset
======================

1.0.0(8y ago)1410[2 issues](https://github.com/hskrasek/guzzle-sunset/issues)MITPHP

Since Sep 9Pushed 8y ago2 watchersCompare

[ Source](https://github.com/hskrasek/guzzle-sunset)[ Packagist](https://packagist.org/packages/hskrasek/guzzle-sunset)[ RSS](/packages/hskrasek-guzzle-sunset/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Guzzle Middleware Sunset
========================

[](#guzzle-middleware-sunset)

[![Build Status](https://camo.githubusercontent.com/3d51e7796f555dbd9046be693820de70af645a213f4ef56cdaefac6e157cf6c9/68747470733a2f2f7472617669732d63692e6f72672f68736b726173656b2f67757a7a6c652d73756e7365742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hskrasek/guzzle-sunset)[![MIT License](https://camo.githubusercontent.com/8c3fd4e91799bbb5f887e1a50757097727a0ed93b440e74b289c2fb349faf0fc/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3030303030302e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Watch out for Sunset headers on HTTP responses, as they signify the deprecation (and eventual removal) of an endpoint.

Sunset is an in-development RFC for a HTTP response header, [currently v03](https://tools.ietf.org/html/draft-wilde-sunset-header-03). Check out [GitHub](https://github.com/dret/I-D/tree/master/sunset-header) for issues and discussion around it's development.

> This specification defines the Sunset HTTP response header field, which indicates that a URI is likely to become unresponsive at a specified point in the future.

The header we're sniffing for looks a little like this:

```
Sunset: Sat, 31 Dec 2018 23:59:59 GMT

```

So long as the server being called is inserting a `Sunset` header to the response with a [HTTP date](https://tools.ietf.org/html/rfc7231#section-7.1.1.1), this client-side code will do stuff.

Install
-------

[](#install)

Via Composer

```
composer require hskrasek/guzzle-sunset
```

Usage
-----

[](#usage)

```
$stack = new \GuzzleHttp\HandlerStack(\GuzzleHttp\choose_handler());
$stack->push(new \HSkrasek\Sunset\SunsetMiddleware($somePsr3Logger));

$client = new \GuzzleHttp\Client(['handler' => $stack]);
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at [hskrasek/guzzle-sunset](https://github.com/hskrasek/guzzle-sunset). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

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

Unknown

Total

1

Last Release

3216d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9611296aa629f6c3fe02f8434ea70dc38d034d0c51985b362a66c8a293529cfc?d=identicon)[hskrasek](/maintainers/hskrasek)

---

Top Contributors

[![hskrasek](https://avatars.githubusercontent.com/u/787487?v=4)](https://github.com/hskrasek "hskrasek (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hskrasek-guzzle-sunset/health.svg)

```
[![Health](https://phpackages.com/badges/hskrasek-guzzle-sunset/health.svg)](https://phpackages.com/packages/hskrasek-guzzle-sunset)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)

PHPackages © 2026

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