PHPackages                             doctrine/instantiator - 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. doctrine/instantiator

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

doctrine/instantiator
=====================

A small, lightweight utility to instantiate objects in PHP without invoking their constructors

2.1.0(4mo ago)11.0k853.3M—4.5%60[1 issues](https://github.com/doctrine/instantiator/issues)20MITPHPPHP ^8.4CI passing

Since Aug 13Pushed 1mo ago22 watchersCompare

[ Source](https://github.com/doctrine/instantiator)[ Packagist](https://packagist.org/packages/doctrine/instantiator)[ Docs](https://www.doctrine-project.org/projects/instantiator.html)[ Fund](https://www.doctrine-project.org/sponsorship.html)[ Patreon](https://www.patreon.com/phpdoctrine)[ RSS](/packages/doctrine-instantiator/feed)WikiDiscussions 2.1.x Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (30)Used By (20)

Doctrine Instantiator
=====================

[](#doctrine-instantiator)

This library provides a way of avoiding usage of constructors when instantiating PHP classes.

[![Build Status](https://camo.githubusercontent.com/5f44483da414756f32e307ff4e759663b0faf6c497e783138c7cb0c796f98a7c/68747470733a2f2f7472617669732d63692e6f72672f646f637472696e652f696e7374616e746961746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/doctrine/instantiator)[![Code Coverage](https://camo.githubusercontent.com/87cefbaeba90269d09275b65cb908de74e796763ca9829d3852fc91b19fefcc8/68747470733a2f2f636f6465636f762e696f2f67682f646f637472696e652f696e7374616e746961746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/doctrine/instantiator/branch/master)[![Dependency Status](https://camo.githubusercontent.com/4b644332e87e03f1169febee2b4a975171d49085717c811191d196a0cad3b5ab/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7061636b6167652f7068702d2d646f637472696e652d2d696e7374616e746961746f722f62616467652e737667)](https://www.versioneye.com/package/php--doctrine--instantiator)

[![Latest Stable Version](https://camo.githubusercontent.com/2f4b0f42fe018119e0c304ab3b6cfc5f6763536d869e99fe640c999d28108995/68747470733a2f2f706f7365722e707567782e6f72672f646f637472696e652f696e7374616e746961746f722f762f737461626c652e706e67)](https://packagist.org/packages/doctrine/instantiator)[![Latest Unstable Version](https://camo.githubusercontent.com/12b439f28ba9907d25d57e052b6b639c9e18ad5bbaadbd4ffbcdc80c04b8b976/68747470733a2f2f706f7365722e707567782e6f72672f646f637472696e652f696e7374616e746961746f722f762f756e737461626c652e706e67)](https://packagist.org/packages/doctrine/instantiator)

Installation
------------

[](#installation)

The suggested installation method is via [composer](https://getcomposer.org/):

```
composer require doctrine/instantiator
```

Usage
-----

[](#usage)

The instantiator is able to create new instances of any class without using the constructor or any API of the class itself:

```
$instantiator = new \Doctrine\Instantiator\Instantiator();

$instance = $instantiator->instantiate(\My\ClassName\Here::class);
```

Contributing
------------

[](#contributing)

Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!

Credits
-------

[](#credits)

This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which has been donated to the doctrine organization, and which is now deprecated in favour of this package.

###  Health Score

82

—

ExcellentBetter than 100% of packages

Maintenance84

Actively maintained with recent releases

Popularity86

Widely adopted with strong download metrics

Community53

Growing community involvement

Maturity91

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~209 days

Total

24

Last Release

52d ago

Major Versions

1.5.0 → 2.0.02022-12-30

1.5.x-dev → 2.0.x-dev2026-01-04

PHP version history (6 changes)1.0.0PHP ~5.3

1.0.4PHP &gt;=5.3,&lt;8.0-DEV

1.1.0PHP ^7.1

1.3.1PHP ^7.1 || ^8.0

2.0.0PHP ^8.1

2.1.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/892698bb1d3f6dae0e3a44abe3e26920ddb4eb000c6c583c87b4db5e5027e166?d=identicon)[beberlei](/maintainers/beberlei)

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

---

Top Contributors

[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (237 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (90 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (33 commits)")[![SenseException](https://avatars.githubusercontent.com/u/859964?v=4)](https://github.com/SenseException "SenseException (17 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (16 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (14 commits)")[![mikeSimonson](https://avatars.githubusercontent.com/u/907613?v=4)](https://github.com/mikeSimonson "mikeSimonson (9 commits)")[![jwage](https://avatars.githubusercontent.com/u/97422?v=4)](https://github.com/jwage "jwage (9 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (7 commits)")[![davedevelopment](https://avatars.githubusercontent.com/u/61351?v=4)](https://github.com/davedevelopment "davedevelopment (5 commits)")[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (5 commits)")[![franmomu](https://avatars.githubusercontent.com/u/720690?v=4)](https://github.com/franmomu "franmomu (5 commits)")[![bendavies](https://avatars.githubusercontent.com/u/625392?v=4)](https://github.com/bendavies "bendavies (4 commits)")[![seferov](https://avatars.githubusercontent.com/u/1233843?v=4)](https://github.com/seferov "seferov (3 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![gquemener](https://avatars.githubusercontent.com/u/668604?v=4)](https://github.com/gquemener "gquemener (3 commits)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (2 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (2 commits)")[![ciaranmcnulty](https://avatars.githubusercontent.com/u/237866?v=4)](https://github.com/ciaranmcnulty "ciaranmcnulty (2 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (1 commits)")

---

Tags

constructorinstantiate

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/doctrine-instantiator/health.svg)

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

###  Alternatives

[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[eventsauce/object-hydrator

Converts structured data into strict objects.

3322.3M20](/packages/eventsauce-object-hydrator)[nikolaposa/cascader

Utility for creating objects in PHP from constructor parameters definitions.

12237.5k3](/packages/nikolaposa-cascader)

PHPackages © 2026

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