Skip to content

Commit 5b0fa94

Browse files
author
Masiukevich Maksim
committed
update dependencies
1 parent d898302 commit 5b0fa94

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@
5151
"php-service-bus/code-style-config": "v1.3.*",
5252
"doctrine/dbal": "v3.0.*",
5353
"phpunit/phpunit": "v9.5.*",
54-
"vimeo/psalm": "v4.4.*",
54+
"vimeo/psalm": "v4.5.*",
5555
"phpstan/phpstan": "v0.12.*"
5656
},
5757
"prefer-stable": true,
5858
"minimum-stability": "stable",
5959
"scripts": {
6060
"psalm": "./vendor/bin/psalm --config=psalm.xml",
6161
"phpstan": "./vendor/bin/phpstan analyse src --level 7",
62-
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --verbose",
63-
"coverage": "./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --verbose",
62+
"tests": "./vendor/bin/phpunit --configuration phpunit.xml --debug --verbose --debug",
63+
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html ./coverage --debug --verbose --debug",
6464
"cs-check": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
6565
"cs-fix": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
6666
"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"

src/Configuration/Attributes/SagaAttributeBasedConfigurationLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function load(string $sagaClass): SagaConfiguration
5555
{
5656
$attributes = $this->attributesReader->extract($sagaClass);
5757

58+
/** @psalm-suppress MixedArgumentTypeCoercion */
5859
$sagaHeader = self::searchSagaHeader(
5960
sagaClass: $sagaClass,
6061
classLevelAttributes: $attributes->classLevelCollection
@@ -65,6 +66,7 @@ classLevelAttributes: $attributes->classLevelCollection
6566
sagaHeader: $sagaHeader
6667
);
6768

69+
/** @psalm-suppress MixedArgumentTypeCoercion */
6870
$handlersCollection = $this->collectSagaEventHandlers(
6971
methodLevelAttributes: $attributes->methodLevelCollection,
7072
sagaMetadata: $sagaMetadata

tests/stubs/TestContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ public function headers(): array
8484

8585
public function metadata(): IncomingMessageMetadata
8686
{
87-
return TestIncomingMessageMetadata::create(uuid(), []);
87+
return new TestIncomingMessageMetadata(uuid(), []);
8888
}
8989
}

tests/stubs/TestIncomingMessageMetadata.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace ServiceBus\Sagas\Tests\stubs;
1414

1515
use ServiceBus\Common\Context\IncomingMessageMetadata;
16+
use function ServiceBus\Common\uuid;
1617

1718
/**
1819
*
@@ -30,23 +31,9 @@ final class TestIncomingMessageMetadata implements IncomingMessageMetadata
3031
*/
3132
private $variables;
3233

33-
public static function create(string $messageId, array $variables): self
34+
public function traceId(): string
3435
{
35-
return new self(
36-
messageId: $messageId,
37-
variables: $variables
38-
);
39-
}
40-
41-
public function with(string $key, float|bool|int|string|null $value): self
42-
{
43-
$variables = $this->variables;
44-
$variables[$key] = $value;
45-
46-
return new self(
47-
messageId: $this->messageId,
48-
variables: $variables
49-
);
36+
return uuid();
5037
}
5138

5239
public function messageId(): string
@@ -72,7 +59,7 @@ public function get(string $key, float|bool|int|string|null $default = null): st
7259
/**
7360
* @psalm-param array<string, string|int|float|bool|null> $variables
7461
*/
75-
private function __construct(string $messageId, array $variables)
62+
public function __construct(string $messageId, array $variables)
7663
{
7764
$this->messageId = $messageId;
7865
$this->variables = $variables;

0 commit comments

Comments
 (0)