PHPackages                             lapaz/aura-di-ext - 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/aura-di-ext

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

lapaz/aura-di-ext
=================

Aura.Di Vocabulary Extension

0.2.0(9y ago)0118MITPHPPHP ^5.6||^7.0

Since May 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/LapazPhp/Aura.Di-ext)[ Packagist](https://packagist.org/packages/lapaz/aura-di-ext)[ RSS](/packages/lapaz-aura-di-ext/feed)WikiDiscussions master Synced 2w ago

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

Aura.Di Vocabulary Extension
============================

[](#auradi-vocabulary-extension)

[![Build Status](https://camo.githubusercontent.com/13b7f8ad0c124168ffdc8c19e502eda4342acf68e3ff5b94d8dc08765083efac/68747470733a2f2f7472617669732d63692e6f72672f4c6170617a5068702f417572612e44692d6578742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LapazPhp/Aura.Di-ext)

- Optionally `->modifiedBy()` and `->modifiedByScript()` enabled after `$di->lazyNew()` and `$di->newFactory()`.
- New method `->newLocator()` to create pure callable object that returns the service.
- Optional parameter `$params = []` added to `->lazyRequire()` and `lazyInclude()`.

(`newLocator()` is simply non lazy version of `lazyGet()`.)

Unlike `ContainerConfig::modify()`, every modification is called on demand at the 1st time of `->get()`.

### Before

[](#before)

```
$di->set('routerContainer', $di->lazy(function () use ($di) {
    $routerContainer = $di->newInstance(\Aura\Router\RouterContainer::class, [], [
        'setLoggerFactory' => function () use ($di) {
            return $di->get('logger');
        },
        // Don't use ->lazyGet() because the returned lazy object would be evaluated before injection.
    ]);

    $map = $routerContainer->getMap();
    $map->get('index', '/');
    // ...

    return $routerContainer;
));
```

### After

[](#after)

```
$dix = ContainerExtension::createFrom($di);

$di->set('routerContainer', $dix->lazyNew(\Aura\Router\RouterContainer::class, [], [
    'setLoggerFactory' => $dix->newLocator('logger'),
])->modifiedBy(function ($routerContainer) {
    $map = $routerContainer->getMap();
    $map->get('index', '/');
    // ...
));
```

### Require/Include

[](#requireinclude)

```
$dix = ContainerExtension::createFrom($di);

$di->params[\Aura\Dispatcher\Dispatcher::class]['objects'] = $dix->lazyRequire(__DIR__ . '/objects.php', [
    'di' => $di,
    // 'anotherConfig' => ...
]);
```

You can use `$di` in `objects.php` to return configured lazy instances.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Total

2

Last Release

3308d ago

### 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 (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lapaz-aura-di-ext/health.svg)

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

PHPackages © 2026

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