kocsismate / php-di-container-benchmarks

Benchmark for some popular PHP Dependency Injection Containers.
https://kocsismate.github.io/php-di-container-benchmarks/benchmark.html
MIT License
76 stars 26 forks source link

Update joomla/di to latest, change prototype tests to match other updates #26

Closed mbabker closed 6 years ago

mbabker commented 6 years ago

I just recently saw the updates @nicolas-grekas made in https://github.com/kocsismate/php-di-container-benchmarks/pull/21 to the Joomla tests, and after reviewing them, the method of retrieving objects from the container can be updated as well.

When I originally wrote the test cases, for the prototype tests I actually ended up configuring those in a way where the container would autowire all the services. With the tests now correctly using a configured container with prototypes, the tests shouldn't use our container's method which handles autowiring but instead use the normal Container::get(). This would also mildly influence the test result because before the tag I just created our Container::buildObject() method was always building a new instance and not checking for existence beforehand (so these tests were influenced by the time it took to build an object then run Container::set() and Container::get(). So the test result should now more accurately reflect only resolving prototyped services and not any of the autowiring behavior.

kocsismate commented 6 years ago

Thank you for the correction! :)