PHPackages                             lapaz/odango - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lapaz/odango

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lapaz/odango
============

AOP inspired advice/function compositor

0.2.0(7y ago)1120[1 issues](https://github.com/LapazPhp/Odango/issues)MITPHPPHP ^7.0

Since May 29Pushed 7y ago2 watchersCompare

[ Source](https://github.com/LapazPhp/Odango)[ Packagist](https://packagist.org/packages/lapaz/odango)[ RSS](/packages/lapaz-odango/feed)WikiDiscussions master Synced yesterday

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

Odango
======

[](#odango)

[![Build Status](https://camo.githubusercontent.com/b4bcb932ae12a2f287764f05706933e5224c7e0760488e2c90a9d00a9c9acb35/68747470733a2f2f7472617669732d63692e6f72672f4c6170617a5068702f4f64616e676f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LapazPhp/Odango)

Odango is a function compositor inspired by Aspect Oriented Programming (AOP).

To separate concerns is better practice even if you don't know AOP, for example caching, logging, transaction, security filter, event dispatching or such as. Cross cutting concerns should be separated from your business logic.

This is not an AOP weaving framework. I prefer Ray.Aop instead if you want some full featured AOP like a Google Guice or such as.

Example
-------

[](#example)

```
$withLoggedTransaction = AdviceComposite::of(
    function ($invocation) use ($logger) {
        $logger->info('Starting transaction.');
        $result = $invocation->proceed();
        $logger->info('Transaction comitted.');
        return $result;
    }
)->with(
    function ($invocation) use ($db) {
        $db->beginTransaction();
        try {
            $result = $invocation->proceed();
            $db->commit();
            return $result;
        } catch (\Exception $ex) {
            $dbh->rollBack();
            throw $ex;
        }
    }
);

$storeDataInvocation = [$this, 'storeData']; // Some callable
$storeDataInvocation = $withLoggedTransaction->bind($storeDataInvocation);

$storeDataInvocation($data);
```

Odango supports Ray.Aop's MethodInterceptor as composition target. So, existing AOP assets may be reusable.

Remark that AdviceComposite instance is immutable because generated function references the creation context. Modification breaks it.

Known issue
-----------

[](#known-issue)

`Joinpoint::getThis()` and `Joinpoint::getMethod()` are throw a `BadMethodCallException` because no object context are bounded.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

2855d ago

PHP version history (2 changes)0.1.0PHP ^5.6||^7.0

0.2.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/15b77626b4e66c3b9bff13810f781e379f2da5e9e6d7194956ae5a14a3f2eed5?d=identicon)[tanakahisateru](/maintainers/tanakahisateru)

---

Top Contributors

[![tanakahisateru](https://avatars.githubusercontent.com/u/403893?v=4)](https://github.com/tanakahisateru "tanakahisateru (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lapaz-odango/health.svg)

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

###  Alternatives

[bear/package

BEAR.Sunday application framework package

30553.3k26](/packages/bear-package)

PHPackages © 2026

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