nWidart / Laravel-Broadway-Demo

This is a test application using https://github.com/qandidate-labs/broadway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Target [Broadway\EventStore\EventStoreInterface] is not instantiable.

spanglishone opened this issue · comments

After installing a fresh download from here and running a composer update, the site returns the following when I try to access the root path in the browser (ie. broadwaydemo.app/):

BindingResolutionException in Container.php line 788:
Target [Broadway\EventStore\EventStoreInterface] is not instantiable.
in Container.php line 788
at Container->build('Broadway\EventStore\EventStoreInterface', array()) in Container.php line 659
at Container->make('Broadway\EventStore\EventStoreInterface', array()) in Application.php line 644
at Application->make('Broadway\EventStore\EventStoreInterface') in Container.php line 1234
at Container->offsetGet('Broadway\EventStore\EventStoreInterface') in PartServiceProvider.php line 40
at PartServiceProvider->Modules\Parts{closure}(object(Application), array()) in Container.php line 776
at Container->build(object(Closure), array()) in Container.php line 659
at Container->make('Modules\Parts\Repositories\EventStorePartRepository', array()) in Application.php line 644
at Application->make('Modules\Parts\Repositories\EventStorePartRepository') in Container.php line 1234
at Container->offsetGet('Modules\Parts\Repositories\EventStorePartRepository') in PartServiceProvider.php line 64
at PartServiceProvider->registerCommandSubscribers() in PartServiceProvider.php line 21
at PartServiceProvider->register() in Application.php line 494
at Application->register('Modules\Parts\PartServiceProvider') in Module.php line 231
at Module->registerProviders() in Module.php line 197
at Module->register() in Repository.php line 295
at Repository->register() in BootstrapServiceProvider.php line 22
at BootstrapServiceProvider->register() in Application.php line 494
at Application->register(object(BootstrapServiceProvider)) in ProviderRepository.php line 75
at ProviderRepository->load(array('Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Bus\BusServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Routing\ControllerServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Mail\MailServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Pipeline\PipelineServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Auth\Passwords\PasswordResetServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'App\Providers\AppServiceProvider', 'App\Providers\BusServiceProvider', 'App\Providers\ConfigServiceProvider', 'App\Providers\EventServiceProvider', 'App\Providers\RouteServiceProvider', 'Collective\Html\HtmlServiceProvider', 'Pingpong\Modules\ModulesServiceProvider', 'Pingpong\Modules\Providers\BootstrapServiceProvider', 'Nwidart\LaravelBroadway\LaravelBroadwayServiceProvider', 'Modules\Acme\AcmeServiceProvider')) in Application.php line 468
at Application->registerConfiguredProviders() in RegisterProviders.php line 15
at RegisterProviders->bootstrap(object(Application)) in Application.php line 183
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 199
at Kernel->bootstrap() in Kernel.php line 110
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53

If I remove the following bindings from Modules\Parts\PartServiceProvider->register() the site will then load, but of course the code doesn't work:

$this->bindEventSourcedRepositories();
$this->bindReadModelRepositories();

$this->registerCommandSubscribers();
$this->registerEventSubscribers();

I really want to test this out and it seems to be well thought out, but I can't even get the site to run to see how everything is working.

Please help.

Thanks in advance.

Broadway has added breaking changes, I'll need to look it up.

Oh ok makes sense. Since its on Packagist, couldn't you just set the composer.json to only get the version it was tested on?

Indeed I should have fixed the version of broadway, that's what I'll do once it's working again. 😃

:) Cool man well thanks for your work. I'm really getting excited about using this in Laravel and the whole usage of event sourcing and CQRS is awesome in theory.

Fixed :)