PHPackages                             donquixote/callback-reflection - 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. donquixote/callback-reflection

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

donquixote/callback-reflection
==============================

1.0.2(7y ago)08531MITPHP

Since Jan 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/donquixote/callback-reflection)[ Packagist](https://packagist.org/packages/donquixote/callback-reflection)[ RSS](/packages/donquixote-callback-reflection/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (13)Used By (1)

[![Build Status](https://camo.githubusercontent.com/183c825ad5b6e87e146ad5f9a83f9a5ac32af001b6ebbed435f694e49edf7ee5/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f646f6e717569786f74652f63616c6c6261636b2d7265666c656374696f6e2e706e67)](https://travis-ci.org/donquixote/callback-reflection)

callback-reflection
===================

[](#callback-reflection)

A library that provides a unified callback interface, with implementations wrapping different callback types.

This way, static methods, closures/lambdas, class constructor calls and other php callables become interchangeable.

Example
-------

[](#example)

```
class C {
  private $x;
  private $y;
  public function __construct($x, $y) {
    $this->x = $x;
    $this->y = $y;
  }
}

// Callback from class constructor.
$callback = CallbackReflection_ClassConstruction::create(C::class);

// Get reflection parameters.
$parameters = $callback->getReflectionParameters();

// Invoke the callback to create a class instance.
$instance = $callback->invokeArgs(['x', 'y']);

// Generate a PHP statement.
$codegenHelper = new CodegenHelper();
$php = $callback->argsPhpGetPhp(["'x'", "'y'"], $codegenHelper);
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

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

Every ~110 days

Recently: every ~217 days

Total

12

Last Release

2568d ago

Major Versions

0.0.0-alpha.6 → 1.0.0-alpha.12016-12-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150032?v=4)[Andreas Hennings](/maintainers/donquixote)[@donquixote](https://github.com/donquixote)

---

Top Contributors

[![donquixote](https://avatars.githubusercontent.com/u/150032?v=4)](https://github.com/donquixote "donquixote (49 commits)")

### Embed Badge

![Health badge](/badges/donquixote-callback-reflection/health.svg)

```
[![Health](https://phpackages.com/badges/donquixote-callback-reflection/health.svg)](https://phpackages.com/packages/donquixote-callback-reflection)
```

###  Alternatives

[xsolve-pl/xsolve-cookie-acknowledgement-bundle

XSolve Cookie Acknowledgement Bundle to handle new privacy law

1182.1k](/packages/xsolve-pl-xsolve-cookie-acknowledgement-bundle)

PHPackages © 2026

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