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.
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 ourContainer::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 runContainer::set()
andContainer::get()
. So the test result should now more accurately reflect only resolving prototyped services and not any of the autowiring behavior.