The apparent point of the class_resolver service in Drupal 8 is to allow classes to create their dependencies in such a way that the implementation can be swapped out. This would be a great thing to include in this module as well, for testing heavily OOP code (the Migrate module leaps to mind).
My use case is that I'm writing a complex migration which uses the Google REST API, and that requires me to create certain objects (like Google_Client, Google_Service_Drive, etc.) directly. Which makes things next to impossible to test. If I had a class resolver service, I could much more easily unit test the migration by swapping out the normal Google_Client and Google_Service_Drive objects with mocks.
Comments
Comment #2
markhalliwellComment #3
markhalliwellThe 7.x-2.x branch was premature, this project has been deprecated in favor of https://www.drupal.org/project/backport.