I guess a lot of us would let the DI container create a transient object (2: commands) for your case (2) which then does injection of the required services into the command (constructor) which then can get forwarded.
I guess a lot of us would let the DI container create a transient object (2: commands) for your case (2) which then does injection of the required services into the command (constructor) which then can get forwarded.
I think there are difficult trade offs to balance and a huge area of focus for me, is making tests easy to write, fast to run and extremely reliable.
I find that creating and managing global state often leads to less reliable and more frustrating tests, these can cause test discipline to collapse, so I'm willing to deal with some pain to avoid those outcomes.
I can understand how other folks might feel differently and may find deep offense at some boilerplate that I think is a little smelly.
The same folks might be willing to put up with more pain in the test environment, or may not place as much value on tests as I do. That's okay too.