-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to restore original pushed message class on consume (#214)
* Allow to restore original pushed message class on consume * Apply fixes from StyleCI * Apply Rector changes (CI) * Move message class name to metadata and fix tests * Apply fixes from StyleCI * Make JsonMessageSerializer::unserialize() faster when unserializable message class is the default one * Unify the EnvelopeTrait::fromData() method body --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: viktorprogger <[email protected]>
- Loading branch information
1 parent
b337fdd
commit af0fb00
Showing
6 changed files
with
109 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Queue\Tests\Unit\Support; | ||
|
||
use Yiisoft\Queue\Message\MessageInterface; | ||
|
||
final class TestMessage implements MessageInterface | ||
{ | ||
public static function fromData(string $handlerName, mixed $data, array $metadata = []): MessageInterface | ||
{ | ||
return new self(); | ||
} | ||
|
||
public function getHandlerName(): string | ||
{ | ||
return 'test'; | ||
} | ||
|
||
public function getData(): mixed | ||
{ | ||
return null; | ||
} | ||
|
||
public function getMetadata(): array | ||
{ | ||
return []; | ||
} | ||
} |