di52 version 2.0 is out!

The PHP 5.2 compatible dependency injection container finally out after some serious rework.

Why version 2.0?

While version 2.0 of DI52 is not a breaking change to 95% of version 1.0 code I’ve dropped the support for the convolute array-based instantiation interface in favour of the more intuitive instance method.

I’ve written about it enough already

I’ve written about DI52 new version in the last two weeks going over some of its existing and new features: here, here, here and here.
I won’t repeat myself.


If I had to choose a dependency injection container for my next project I’d use two criteria: its API and speed.
As per the API you can read it all on DI52 readme file (spoiler: Laravel’s like with a sprinkle of Pimple).
As per speed I have to make a disclaimer: I’ve used TomBZombie’s synthetic benchmarks on a PHP 7 virtual machine; all of the disclaimers of synthetic benchmarks apply, use with care, experiment and make your own informed choice.
I’ve cut the number of benchmarks to the fastest DI containers and added di52 ones:
Short benchmarks
Long benchmarks

Get it

It’s on GitHub now.

I appreciate your input