PHPackages                             jtaurus/autoinstantiator - 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. jtaurus/autoinstantiator

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

jtaurus/autoinstantiator
========================

Demo of automatic object resolution using PHP's reflection API.

17PHP

Since Aug 22Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

autoinstantiator
================

[](#autoinstantiator)

Demo of automatic object resolution using PHP's reflection API.

How does it work
================

[](#how-does-it-work)

Pass a classname to Autoinstantiators build method and receive an object with all of its dependencies instantiated for you:

`$barInstance = (new AutoInstantiator())->build("jtaurus\autoinstantiator\Bar")`

Bars constructor:

`public function __construct(Foo $fooInstance, Baz $bazInstance, $someString = "somethingValue")`

AutoInstantiator will look at specified class constructor. If it has any dependencies that we are able to resolve, it will add them to dependency array and use ReflectionClass::newInstanceMethod($args) to assemble them into a new instance of a given class.

Works for typehinted parameters and parameters with default values.

Does not work for parameters that don't have at least one of these things. There is no way of knowing what value should we assign to it.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f4ba201ccfe6b8946af04f674028cd027cf7632ca209e7679112f50c18bdacd?d=identicon)[jtauri](/maintainers/jtauri)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jtaurus-autoinstantiator/health.svg)

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

###  Alternatives

[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13443.9k](/packages/laravel-admin-ext-china-distpicker)[godbout/dash-docset-builder

Dash (LOVE) Docset Builder in PHP (LOVE).

1253.5k](/packages/godbout-dash-docset-builder)[jiannei/laravel-enum

A simple and easy-to-use enumeration extension package to help you manage enumerations in your project more conveniently, supporting Laravel and Lumen

3933.4k5](/packages/jiannei-laravel-enum)[jimbojsb/workman

PHP process forking &amp; daemonizing library

608.8k](/packages/jimbojsb-workman)[droptica/droopler-project

Project template for Droopler with Composer

5010.0k](/packages/droptica-droopler-project)[mdmsoft/yii2-widgets

Widgets for Yii2

178.1k](/packages/mdmsoft-yii2-widgets)

PHPackages © 2026

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