PHPackages                             avonnadozie/liteonion - 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. avonnadozie/liteonion

ActiveLibrary

avonnadozie/liteonion
=====================

2.0.0(7y ago)23071MITPHP

Since Jul 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/AVONnadozie/liteonion)[ Packagist](https://packagist.org/packages/avonnadozie/liteonion)[ RSS](/packages/avonnadozie-liteonion/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (4)Used By (1)

LiteOnion
=========

[](#liteonion)

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

[](#installation)

```
composer require avonnadozie/liteonion
```

Usage
-----

[](#usage)

```
class BeforeLayer implements LayerInterface {

    public function peel($object, Closure $next)
    {
        $object->runs[] = 'before';

        return $next($object);
    }

}

class AfterLayer implements LayerInterface {

    public function peel($object, Closure $next)
    {
        $response = $next($object);

        $object->runs[] = 'after';

        return $response;
    }

}

$object = new StdClass;
$object->runs = [];

$onion = new Onion;
$end = $onion->layer([
                new AfterLayer(),
                new BeforeLayer(),
                new AfterLayer(),
                new BeforeLayer()
            ])
            ->peel($object, function($object){
                $object->runs[] = 'core';
                return $object;
            });

var_dump($end);
```

Will output

```
..object(stdClass)#161 (1) {
  ["runs"]=>
  array(5) {
    [0]=>
    string(6) "before"
    [1]=>
    string(6) "before"
    [2]=>
    string(4) "core"
    [3]=>
    string(5) "after"
    [4]=>
    string(5) "after"
  }
}

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~581 days

Total

3

Last Release

2805d ago

Major Versions

0.1.0 → 1.0.02017-01-10

1.0.0 → 2.0.02018-09-06

### Community

Maintainers

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

---

Top Contributors

[![esbenp](https://avatars.githubusercontent.com/u/934819?v=4)](https://github.com/esbenp "esbenp (10 commits)")[![AVONnadozie](https://avatars.githubusercontent.com/u/10802366?v=4)](https://github.com/AVONnadozie "AVONnadozie (3 commits)")[![MBoretto](https://avatars.githubusercontent.com/u/6514506?v=4)](https://github.com/MBoretto "MBoretto (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/avonnadozie-liteonion/health.svg)

```
[![Health](https://phpackages.com/badges/avonnadozie-liteonion/health.svg)](https://phpackages.com/packages/avonnadozie-liteonion)
```

PHPackages © 2026

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