Skip to content

Validation is being fired twice when using ValidationCommandBus #51

@zaalbarxx

Description

@zaalbarxx

Hi!
I've noticed a strange bug when trying to use ValidationCommandBus. It appears that when executing command with this bus this decorator is firing validator then using the default command bus which is bound to another ValidationCommandBus via the service provider.

$this->app->bindShared('Laracasts\Commander\CommandBus', function ($app)
        {
            $default = $app->make('Laracasts\Commander\DefaultCommandBus');
            $translator = $app->make('Laracasts\Commander\CommandTranslator');

            return new ValidationCommandBus($default, $app, $translator);
        });

This code binds the interface to implementation of ValidationCommandBus so it is looping here for me. The version is 1.3.10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions