🌟 Instantiate PHP objects without constructors calls
Switch branches/tags
Clone or download
Ocramius Merge pull request #20 from samsonasik/patch-1
add new line at .gitignore for eof
Latest commit 8b7e2eb Apr 12, 2015



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

Deprecated in favour of doctrine/instantiator

This library has been donated to the doctrine organization and has been renamed to doctrine/instantiator. This repository/package is deprecated.

The library will still be maintained, but there won't be any new feature additions, and BC breaks will be refused, as no more future major versions are planned.

Bugs and security issues will still be fixed, and minor-, as well as patch- releases will be tagged if needed.

It is strongly suggested to use doctrine/instantiator instead.


Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight Dependency Status HHVM Status

Latest Stable Version Latest Unstable Version


The suggested installation method is via composer:

php composer.phar require ocramius/instantiator:1.1.*


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

$instantiator = new \Instantiator\Instantiator();

$instance = $instantiator->instantiate('My\\ClassName\\Here');


Please read the CONTRIBUTING.md contents if you wish to help out!