Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Masiukevich Maksim committed Feb 13, 2021
1 parent d898302 commit 5b0fa94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
"php-service-bus/code-style-config": "v1.3.*",
"doctrine/dbal": "v3.0.*",
"phpunit/phpunit": "v9.5.*",
"vimeo/psalm": "v4.4.*",
"vimeo/psalm": "v4.5.*",
"phpstan/phpstan": "v0.12.*"
},
"prefer-stable": true,
"minimum-stability": "stable",
"scripts": {
"psalm": "./vendor/bin/psalm --config=psalm.xml",
"phpstan": "./vendor/bin/phpstan analyse src --level 7",
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose",
"coverage": "./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose",
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --debug --verbose --debug",
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --debug --verbose --debug",
"cs-check": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
"cs-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
"pre-commit": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes && ./vendor/bin/psalm --config=psalm.xml && ./vendor/bin/phpstan analyse src --level 7 && ./vendor/bin/phpunit --configuration phpunit.xml --verbose"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function load(string $sagaClass): SagaConfiguration
{
$attributes = $this->attributesReader->extract($sagaClass);

/** @psalm-suppress MixedArgumentTypeCoercion */
$sagaHeader = self::searchSagaHeader(
sagaClass: $sagaClass,
classLevelAttributes: $attributes->classLevelCollection
Expand All @@ -65,6 +66,7 @@ classLevelAttributes: $attributes->classLevelCollection
sagaHeader: $sagaHeader
);

/** @psalm-suppress MixedArgumentTypeCoercion */
$handlersCollection = $this->collectSagaEventHandlers(
methodLevelAttributes: $attributes->methodLevelCollection,
sagaMetadata: $sagaMetadata
Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/TestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ public function headers(): array

public function metadata(): IncomingMessageMetadata
{
return TestIncomingMessageMetadata::create(uuid(), []);
return new TestIncomingMessageMetadata(uuid(), []);
}
}
21 changes: 4 additions & 17 deletions tests/stubs/TestIncomingMessageMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
namespace ServiceBus\Sagas\Tests\stubs;

use ServiceBus\Common\Context\IncomingMessageMetadata;
use function ServiceBus\Common\uuid;

/**
*
Expand All @@ -30,23 +31,9 @@ final class TestIncomingMessageMetadata implements IncomingMessageMetadata
*/
private $variables;

public static function create(string $messageId, array $variables): self
public function traceId(): string
{
return new self(
messageId: $messageId,
variables: $variables
);
}

public function with(string $key, float|bool|int|string|null $value): self
{
$variables = $this->variables;
$variables[$key] = $value;

return new self(
messageId: $this->messageId,
variables: $variables
);
return uuid();
}

public function messageId(): string
Expand All @@ -72,7 +59,7 @@ public function get(string $key, float|bool|int|string|null $default = null): st
/**
* @psalm-param array<string, string|int|float|bool|null> $variables
*/
private function __construct(string $messageId, array $variables)
public function __construct(string $messageId, array $variables)
{
$this->messageId = $messageId;
$this->variables = $variables;
Expand Down

0 comments on commit 5b0fa94

Please sign in to comment.