We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have CommandA with ONE decorator class.
I have CommandB with NO decorator classes.
In CommandA handler, I execute CommandB.
By right, when I execute CommandA, these steps should happen:
1- Decorator of CommandA should be executed 2- CommandA handler should be called 3- CommandB handler should be called
However, I found that the decorator class of CommandA will execute twice:
1- Decorator of CommandA is executed 2- CommandA handler is called 3- Decorator of CommandA is executed again 4- CommandB handler is called
I managed to fix the issue by adding this check to CommanderTrait->execute() function:
if (empty($decorators)) { $bus->emptyDecorators(); }
where emptyDecorators() is defined in CommandBus implementation as:
/** * Remove all */ public function emptyDecorators () { $this->decorators = []; }
Thanks.
The text was updated successfully, but these errors were encountered:
This was fixed already, BUT, it was not fixed in the version for Laravel 4. This definitely needs to be handled.
If you want to manually do it for now, in the ServiceProvider, changed bindShared to bind.
bindShared
bind
Sorry, something went wrong.
No branches or pull requests
I have CommandA with ONE decorator class.
I have CommandB with NO decorator classes.
In CommandA handler, I execute CommandB.
By right, when I execute CommandA, these steps should happen:
1- Decorator of CommandA should be executed
2- CommandA handler should be called
3- CommandB handler should be called
However, I found that the decorator class of CommandA will execute twice:
1- Decorator of CommandA is executed
2- CommandA handler is called
3- Decorator of CommandA is executed again
4- CommandB handler is called
I managed to fix the issue by adding this check to CommanderTrait->execute() function:
where emptyDecorators() is defined in CommandBus implementation as:
Thanks.
The text was updated successfully, but these errors were encountered: