doctrine/instantiator ? reverse-engineered prompt

Reverse engineered prompt

Build me a small PHP library that can create an object without calling its constructor. I want a simple class I can use like new Instantiator() and then pass in a class name to get back a fresh instance, even if that class has a constructor I do not want to run.

Keep it lightweight and focused on this one job, with good tests and clear error handling for classes that cannot be created. Please make it work nicely as a Composer package, include the basic docs and examples in the README, and keep the code clean and well covered by unit tests. If you need to check the current PHP docs or best practice for instantiating objects without constructors, look that up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab