PHPackages                             gonzalo123/new - 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. gonzalo123/new

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

gonzalo123/new
==============

Creating new instances auto injecting dependencies from a Pimple Container

189PHP

Since Nov 16Pushed 11y ago2 watchersCompare

[ Source](https://github.com/gonzalo123/new)[ Packagist](https://packagist.org/packages/gonzalo123/new)[ RSS](/packages/gonzalo123-new/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Creating new instances auto injecting dependencies from a DIC

[![Build Status](https://camo.githubusercontent.com/7f4da98fa59401072b3ec0a5f778bbe2db6775a3d310b68a36e0eff860b30dd5/68747470733a2f2f7472617669732d63692e6f72672f676f6e7a616c6f3132332f6e65772e737667)](https://travis-ci.org/gonzalo123/new)

```
class Foo
{
    public function hi($name)
    {
        return "Hi $name";
    }
}

class Another
{
    public function bye($name)
    {
        return "Bye $name";
    }
}

class Bar
{
    private $foo;

    public function __construct(Foo $foo, $surname = null)
    {
        $this->foo     = $foo;
        $this->surname = $surname;
    }

    public function hi(Another $another, $name)
    {
        return $this->foo->hi($name . " " . $this->surname) . ' ' . $another->bye($name);
    }
}

$container = new Pimple\Container   ();
$container['name'] = "Gonzalo2";

$builder = new G\Builder($container);

/** @var Bar $bar */
$bar = $builder->create('Bar', ['surname' => 'Ayuso']);
var_dump($builder->call([$bar, 'hi']));

var_dump($bar->hi(new Another(), 'xxxxx'));
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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.

### Community

Maintainers

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

---

Top Contributors

[![gonzalo123](https://avatars.githubusercontent.com/u/39072?v=4)](https://github.com/gonzalo123 "gonzalo123 (7 commits)")[![hgraca](https://avatars.githubusercontent.com/u/1809002?v=4)](https://github.com/hgraca "hgraca (1 commits)")

### Embed Badge

![Health badge](/badges/gonzalo123-new/health.svg)

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

###  Alternatives

[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3375.4k2](/packages/ishanvyas22-asset-mix)[prgayman/laravel-zatca

Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing

2926.9k1](/packages/prgayman-laravel-zatca)[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)

PHPackages © 2026

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