PHPackages                             astrotomic/psr-8 - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. astrotomic/psr-8

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

astrotomic/psr-8
================

Common interface for hugging libraries

1.0.0(5y ago)515MITPHPPHP &gt;=5.3.0

Since Feb 4Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Astrotomic/psr-8)[ Packagist](https://packagist.org/packages/astrotomic/psr-8)[ Docs](https://github.com/php-fig/fig-standards/blob/master/proposed/psr-8-hug/psr-8-hug.md)[ Fund](https://offset.earth/treeware)[ GitHub Sponsors](https://github.com/Gummibeer)[ RSS](/packages/astrotomic-psr-8/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PSR-8 Hug
=========

[](#psr-8-hug)

This repository holds all interfaces/classes/traits related to [PSR-8](https://github.com/php-fig/fig-standards/blob/master/proposed/psr-8-hug/psr-8-hug.md).

Note that this is not a huggable of its own. It is merely an interface that describes a huggable. See the specification for more details.

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

[](#installation)

```
composer require astrotomic/psr-8
```

Usage
-----

[](#usage)

If you need to hug, you can use the interface like this:

```
use Astrotomic\Hug\Huggable;

class HugController
{
    public function __invoke(Huggable $hugger, Huggable $huggable)
    {
        $hugger->hug($huggable);
    }
}
```

Credits
-------

[](#credits)

- 🧑‍💻 [Tom Witkowski](https://github.com/Gummibeer)
- 📝 [Larry Garfield](https://github.com/Crell) - Editor of original PSR
- ‍💌 [Tobias van Beek](https://github.com/tvbeek) - Idea for the package after a [postcard](https://twitter.com/devgummibeer/status/1357429609348874240)
- 🐶 Yoda - [Reason](https://gummibeer.dev/blog/2021/yoda) for [Tobias](https://github.com/tvbeek) to send a [postcard](https://twitter.com/devgummibeer/status/1357429609348874240)
- [All Contributors](https://github.com/Astrotomic/psr-8/graphs/contributors)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1920d ago

### Community

Maintainers

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

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (5 commits)")

---

Tags

hugpsrpsr-8psrpsr-8hug

### Embed Badge

![Health badge](/badges/astrotomic-psr-8/health.svg)

```
[![Health](https://phpackages.com/badges/astrotomic-psr-8/health.svg)](https://phpackages.com/packages/astrotomic-psr-8)
```

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[psr/clock

Common interface for reading the clock.

642332.9M343](/packages/psr-clock)[lctrs/psalm-psr-container-plugin

Let Psalm understand better psr11 containers

17648.1k13](/packages/lctrs-psalm-psr-container-plugin)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

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