laracasts / Commander

Easily leverage commands and domain events in your Laravel projects.
https://laracasts.com/series/commands-and-domain-events
MIT License
279 stars 68 forks source link

Call to undefined method Laracasts\Commander\ValidationCommandBus::decorate() #17

Closed ronnievisser closed 10 years ago

ronnievisser commented 10 years ago

I have created a so called decorator and passed it to the execute method like so

$this->execute( ImportPlayerCommand::class, $input, [
                'ImportPlayerPositionConverter'
            ] );

the decorator isn't doing anything yet

use Laracasts\Commander\CommandBus;

class ImportPlayerPositionConverter implements CommandBus {

    public function execute( $command ) {
       die('dddddd');
    }

}

the error thrown is: Call to undefined method Laracasts\Commander\ValidationCommandBus::decorate()

regards, Ronnie

laracasts commented 10 years ago

Can you composer update to at least 1.3.8 of this package and try again? Thx! That should fix it.

ronnievisser commented 10 years ago

After updating is get this error. Code is still the same as above, class is inthe same namespace as the command and handler classes

Class ImportPlayerPositionConverter does not exist

edit: Nevermind, forgot to put the full namespace