Open RonnyPfannschmidt opened 2 months ago
Currently click integration does not enter context on command. This is done because often there is another framework with its own scopes logic.
Here username looks more like date for interactor, than something related to dependencies. But anyway, we'll think more
this could be summarized as "pass in dependency configuration for the container in some way
i realize that the inject/group hlpers pull together the whole picture
i want to be able to easily compose the Context data for entering
From my current point of view groups is the place for configuration of app+container. Command - is one of the scenarios to trigger. We do not pass parsed data from web framework handlers to container, same is here.
But anyway, it is a place for improvement, though it is not yet clear in which way we should develop
One of the options here is to enter nested scope manually inside command handler. You can pass context to context manager.
If you need, you can create container with scope RUNTIME, so the next scope will be APP
In my case, I'm using custom scope's anyway because it's not a webapp
currently the click integration cannot pass options into the context easily
i'd like to be able to do something like the following (possibly with custom scopes)