Open BonBonSlick opened 6 years ago
How does your Message objects look like? Might be related to #72?
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}"} []
https://github.com/prooph/proophessor-do-symfony/issues/30