Skip to content
New issue

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

Outdated docs #74

Open
BonBonSlick opened this issue Jun 22, 2018 · 2 comments
Open

Outdated docs #74

BonBonSlick opened this issue Jun 22, 2018 · 2 comments

Comments

@BonBonSlick
Copy link

prooph/proophessor-do-symfony#30

But please note issue with examples. Maybe docs update? And video with example seems to be outdated. ALso, message_detection does not work for me. "QueryBus was not able to identify a Finder for query "

@UFOMelkor
Copy link
Member

How does your Message objects look like? Might be related to #72?

@BonBonSlick
Copy link
Author

BonBonSlick commented Jul 21, 2018

Does not helped, added new lines of code because of extends Query, added message message_detection="true", it does not work, as described.


use Prooph\Common\Messaging\Query;
class GetUserList extends Query{
  public function order() :? QueryOrder
    {
        return $this->order;
    }
    protected function setPayload(array $payload) : void
    {
        $this->order = $payload['order'];
    }

    public function payload() : array
    {
        return ['order' => $this->order];
    }

No luck, handler not triggered.

  public function __invoke(GetUserList $query, Deferred $deferred)
    {
 dump($query);
        exit;

Doesnt work for command, and query, events not tested yet.
Also noticed, that if i extended Command or Query classes, but set handler directly, not with message_detection i have exception.

[2018-07-21 16:17:31] critical.CRITICAL: [2018-07-21 16:17:31] EXCEPTION! {"In":"/var/www/ssssss/vendor/prooph/service-bus/src/Exception/MessageDispatchException.php","Message":"Message dispatch failed. See previous exception for details.","File":"/var/www/ssssss/vendor/prooph/common/src/Messaging/DomainMessage.php","Line":109,"Trace":"#0 /var/www/ssssss/vendor/prooph/service-bus/src/QueryBus.php(70): Prooph\\ServiceBus\\Exception\\MessageDispatchException::failed(Object(TypeError))\n#1 /var/www/ssssss/vendor/prooph/common/src/Event/ProophActionEventEmitter.php(57): Prooph\\ServiceBus\\QueryBus->Prooph\\ServiceBus\\{closure}(Object(Prooph\\Common\\Event\\DefaultActionEvent))\n#2 /var/www/ssssss/vendor/prooph/service-bus/src/MessageBus.php(106): Prooph\\Common\\Event\\ProophActionEventEmitter->dispatch(Object(Prooph\\Common\\Event\\DefaultActionEvent))\n#3 /var/www/ssssss/vendor/prooph/service-bus/src/QueryBus.php(109): Prooph\\ServiceBus\\MessageBus->triggerFinalize(Object(Prooph\\Common\\Event\\DefaultActionEvent))\n#4 /var/www/ssssss/src/Application/Controller/AdminPanel/AdminUserController.php(93): Prooph\\ServiceBus\\QueryBus->dispatch(Object(App\\Application\\CQRS\\User\\Query\\UseCase\\GetUserList))\n#5 /var/www/grassssssgg/vendor/symfony/http-kernel/HttpKernel.php(149): App\\Application\\Controller\\AdminPanel\\AdminUserController->index(Object(Symfony\\Component\\HttpFoundation\\Request))\n#6 /var/www/ssssss/vendor/symfony/http-kernel/HttpKernel.php(66): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#7 /var/www/ssssss/vendor/symfony/http-kernel/Kernel.php(188): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#8 /var/www/ssssss/public/index.php(34): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#9 {main}"} []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants